-
Notifications
You must be signed in to change notification settings - Fork 1
OntologyTerm endpoints
tudorgroza edited this page Apr 23, 2021
·
11 revisions
- Endpoint:
POST /v1/projects/{projectId}/ontology-terms
- Note: if no
status
is provided in theontologyTerm
part of the payload, the term will automatically get theNEEDS_CREATION
status. - Payload:
{
"context": "CONTEXT",
"ontologyTerm":
{
"curie": "MONDO:0007037", // NOT EMPTY
"iri": "http://purl.obolibrary.org/obo/MONDO_0007037", // NOT EMPTY
"label": "Achondroplasia", // NOT EMPTY
"status": "NEEDS_IMPORT",
"description": "Description",
"crossRefs": "X-refs"
}
}
- Response (OntologyTerm):
201 | CREATED
{
"curie": "MONDO:0007037",
"iri": "http://purl.obolibrary.org/obo/MONDO_0007037",
"label": "Achondroplasia",
"status": "NEEDS_IMPORT",
"description": "Description",
"crossRefs": "X-refs"
}
OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it
- Endpoint:
GET /v1/projects/{projectId}/ontology-terms?status=<STATUS>&context=<CONTEXT>
- Parameters:
-
status
(MANDATORY) -NEEDS_IMPORT | NEEDS_CREATION
. -
context
(MANDATORY) - project context
-
- Response (Paginated list of OntologyTerm):
200 | OK
[
{
"curie": "MONDO:0007037",
"iri": "http://purl.obolibrary.org/obo/MONDO_0007037",
"label": "Achondroplasia",
"status": "NEEDS_IMPORT",
"description": "Description",
"crossRefs": "X-refs"
},
...
]
OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it
- Endpoint:
POST /v1/projects/{projectId}/ontology-terms/action
- Payload:
{
"status": "NEEDS_IMPORT | NEEDS_CREATION",
"context": "CONTEXT",
"comment": "STRING"
}
- Response:
201 | CREATED
OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it
- Endpoint:
POST /v1/projects/{projectId}/ontology-terms/export
- Payload:
{
"status": "NEEDS_IMPORT | NEEDS_CREATION",
"context": "CONTEXT"
}
- Response:
201 | CREATED
+byte array payload
denoting the resulted file - Note:
CONTENT_DISPOSITION
will contain infilename
the name of the resulted file OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it
- Endpoint:
GET /v1/projects/{projectId}/ontology-terms-stats?context=<CONTEXT>
- Parameter:
context
(MANDATORY) - project context - Response:
200 | OK
{
"stats": {
"NEEDS_CREATION": 10,
"NEEDS_IMPORT": 10
}
}
OR
404 | NOT FOUND
* If projectId
is inexistent or user doesn't have access to it