-
Notifications
You must be signed in to change notification settings - Fork 1
Mapping endpoints
tudorgroza edited this page Mar 22, 2021
·
14 revisions
- Create initial mapping with
POST
and a list of Ontology Terms - Update mapping by changing the list of mapped Ontology Terms with
PUT
- Delete a mapping completely with
DELETE
- Endpoint:
GET /v1/projects/{projectId}/mappings?entityId=<entityId>
- Response: Mapping:
200 | OK
{
"id": "60252fc2d5efd95ee8890eb2",
"entityId": "60252fc2d5efd95ee8890ead",
"ontologyTerms": [{
"curie": "Orphanet:15",
"iri": "http://www.orpha.net/ORDO/Orphanet_15",
"label": "Achondroplasia",
"status": "CURRENT | ..."
},
...
]
"reviewed": false,
"status": "AWAITING_REVIEW | ...",
"reviews": [],
"comments": [],
"created": {
"user": {
"name": "Test User 1",
"email": "[email protected]"
},
"timestamp": "2021-02-11T21:23:14.156+08:00"
}
}
OR
404 | NOT FOUND
- If
projectId
orentityId
are inexistent or user doesn't have access toprojectId
- Endpoint:
POST /v1/projects/{projectId}/mappings
- Payload:
{
"entityId": "STRING",
"ontologyTerms": [{
"curie": "MONDO:0007037",
"iri": "http://purl.obolibrary.org/obo/MONDO_0007037",
"label": "Achondroplasia",
"status": "NEEDS_IMPORT | ..."
}]
}
- Response: Mapping:
201 | CREATED
{
"id": "60252fc2d5efd95ee8890eb2",
"entityId": "60252fc2d5efd95ee8890ead",
"ontologyTerms": [{
"curie": "Orphanet:15",
"iri": "http://www.orpha.net/ORDO/Orphanet_15",
"label": "Achondroplasia",
"status": "CURRENT | ..."
},
...
]
"reviewed": false,
"status": "AWAITING_REVIEW | ...",
"reviews": [],
"comments": [],
"created": {
"user": {
"name": "Test User 1",
"email": "[email protected]"
},
"timestamp": "2021-02-11T21:23:14.156+08:00"
}
}
OR
404 | NOT FOUND
- If
projectId
orentityId
are inexistent or user doesn't have access toprojectId
- Endpoint:
PUT /v1/projects/{projectId}/mappings/{mappingId}
- Payload Mapping
{
"id": "60252fc2d5efd95ee8890eb2",
"entityId": "60252fc2d5efd95ee8890ead",
"ontologyTerms": [{
"curie": "Orphanet:15",
"iri": "http://www.orpha.net/ORDO/Orphanet_15",
"label": "Achondroplasia",
"status": "CURRENT | ..."
},
...
]
"reviewed": false,
"status": "AWAITING_REVIEW | ...",
"reviews": [],
"comments": [],
"created": {
"user": {
"name": "Test User 1",
"email": "[email protected]"
},
"timestamp": "2021-02-11T21:23:14.156+08:00"
}
}
- Response: Mapping:
200 | OK
{
"id": "60252fc2d5efd95ee8890eb2",
"entityId": "60252fc2d5efd95ee8890ead",
"ontologyTerms": [{
"curie": "Orphanet:15",
"iri": "http://www.orpha.net/ORDO/Orphanet_15",
"label": "Achondroplasia",
"status": "CURRENT | ..."
},
...
]
"reviewed": false,
"status": "AWAITING_REVIEW | ...",
"reviews": [],
"comments": [],
"created": {
"user": {
"name": "Test User 1",
"email": "[email protected]"
},
"timestamp": "2021-02-11T21:23:14.156+08:00"
}
}
OR
404 | NOT FOUND
- If
projectId
ormappingId
are inexistent or user doesn't have access toprojectId
- Endpoint:
DELETE /v1/projects/{projectId}/mappings/{mappingId}
- Response:
200 | OK
or404 | NOT FOUND
ifprojectId
ormappingId
are inexistent or user doesn't have access toprojectId