-
Notifications
You must be signed in to change notification settings - Fork 1
Public data export
tudorgroza edited this page Mar 16, 2021
·
7 revisions
- Create export request - results in a
requestId
, which can then be used to poll for updates on the request - Poll for status updates - use the
requestId
to retrieve an update on the export progress.
The request status takes the following values:
- REQUESTED - status denoting a successful creation of the export request
requestId
- IN_PROGRESS - export task associated with
requestId
is in progress - FINALIZED - export task completed. Package can be retrieved.
- FAILED - export task failed.
- Download package - the export results in a
ZIP
file containing a JSON export of the data, and can be retrieved using therequestId
- Outcome is a list of objects representing a trimmed down version of Entity
-
mappingSuggestions
are a short version of Mapping Suggestion -
mapping
is a short version of Mapping -
ontologyTerm
follows the exact definition of Ontology Term -
created
is the standard provenance object used throughout the DTOs.
[
{
"name": "TEXT",
"upstreamId": "STRING", // If provided
"context": "STRING", // If provided, or `default`
"priority": "INTEGER", // If provided at import
"mappingSuggestions": [
{
"ontologyTerm": {
"curie": "MONDO:0007037",
"iri": "http://purl.obolibrary.org/obo/MONDO_0007037",
"label": "Achondroplasia",
"status": "NEEDS_IMPORT",
"description": "Description",
"crossRefs": "X-refs"
},
"created": {
"timestamp": "2021-02-10T16:01:50.131+08:00",
"user": {
"name": "User name",
"email": "User email"
}
}
},
...
],
"mapping":
{
"ontologyTerm": {
"curie": "MONDO:0007037",
"iri": "http://purl.obolibrary.org/obo/MONDO_0007037",
"label": "Achondroplasia",
"status": "NEEDS_IMPORT",
"description": "Description",
"crossRefs": "X-refs"
},
"created": {
"timestamp": "2021-02-10T16:01:50.131+08:00",
"user": {
"name": "User name",
"email": "User email"
}
},
"reviewed": true | false,
"status": "AWAITING_REVIEW | REVIEW_IN_PROGRESS | REQUIRED_REVIEWS_REACHED"
}
},
...
]
- Endpoint:
POST /public/v1/projects/{projectId}/export
- Payload: empty
- Response:
-
201 | CREATED
+requestId | STRING
OR -
404 | NOT FOUND
ifprojectId
is inexistent
-
- Endpoint:
GET /public/v1/projects/{projectId}/export/{requestId}
- Response:
200 | OK
{
"requestId": "STRING",
"status": "REQUESTED | IN_PROGRESS | FINALIZED | FAILED"
}
- Endpoint:
GET /public/v1/projects/{projectId}/export/{requestId}/download
- Response:
200 | OK
+byte array file content