-
Notifications
You must be signed in to change notification settings - Fork 1
Projects endpoints
tudorgroza edited this page May 4, 2021
·
14 revisions
- Endpoint:
POST /v1/projects
- Payload:
{
"name": "Project name", // MANDATORY
"description": "Some description",
"numberOfReviewsRequired": 3,
"datasources": [
"atlas",
"uniprot",
"gwas",
...
],
"ontologies": [
"efo",
"mondo",
"hp",
"ordo"
],
"preferredMappingOntologies": [ "efo" ],
"graphRestriction" : {
"classes" : [ "EFO:0004446", "GO:0007049", "GO:0022403"] // MANDATORY - curies
"relations: [ "rdfs:subClassOf" ], // MANDATORY
"direct": true | false,
"include_self": true | false
}
}
- Response (Project):
201 | CREATED
{
"id": "602392ee1d09a55d6e0384d4",
"name": "Project name",
"description": "Some description",
"numberOfReviewsRequired": 3,
"contexts": [
{
"name": "NAME",
"description": "Some description",
"datasources": [
"atlas",
"uniprot",
"gwas",
...
],
"ontologies": [
"efo",
"mondo",
"hp",
"ordo",
...
],
"preferredMappingOntologies": [ "efo" ],
"graphRestriction" : {
"classes" : [ "EFO:0004446", "GO:0007049", "GO:0022403"] // MANDATORY - curies
"relations: [ "rdfs:subClassOf" ], // MANDATORY
"direct": true | false,
"include_self": true | false
}
},
...
],
"created": {
"timestamp": "2021-02-10T16:01:50.131+08:00",
"user": {
"name": "User name",
"email": "User email"
}
}
}
- Endpoint:
GET /v1/projects
- Response (List of Project):
200 | OK
[{
"id": "602392ee1d09a55d6e0384d4",
"name": "Project name",
"description": "Some description",
"numberOfReviewsRequired": 3,
"contexts": [
{
"name": "NAME",
"description": "Some description",
"datasources": [
"atlas",
"uniprot",
"gwas",
...
],
"ontologies": [
"efo",
"mondo",
"hp",
"ordo",
...
],
"preferredMappingOntologies": [ "efo" ],
"graphRestriction" : {
"classes" : [ "EFO:0004446", "GO:0007049", "GO:0022403"] // MANDATORY - curies
"relations: [ "rdfs:subClassOf" ], // MANDATORY
"direct": true | false,
"include_self": true | false
}
},
...
],
"created": {
"timestamp": "2021-02-10T16:01:50.131+08:00",
"user": {
"name": "User name",
"email": "User email"
}
}
}, ...
]
- Endpoint:
GET /v1/projects/{projectId}
- Response (Project):
200 | OK
{
"id": "602392ee1d09a55d6e0384d4",
"name": "Project name",
"description": "Some description",
"numberOfReviewsRequired": 3,
"contexts": [
{
"name": "NAME",
"description": "Some description",
"datasources": [
"atlas",
"uniprot",
"gwas",
...
],
"ontologies": [
"efo",
"mondo",
"hp",
"ordo",
...
],
"preferredMappingOntologies": [ "efo" ],
"graphRestriction" : {
"classes" : [ "EFO:0004446", "GO:0007049", "GO:0022403"] // MANDATORY - curies
"relations: [ "rdfs:subClassOf" ], // MANDATORY
"direct": true | false,
"include_self": true | false
}
},
...
],
"created": {
"timestamp": "2021-02-10T16:01:50.131+08:00",
"user": {
"name": "User name",
"email": "User email"
}
}
}
OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it
- Endpoint:
PUT /v1/projects/{projectId}
-
Note: Only
name
,description
andnumberOfReviewsRequired
can be updated. Updatingcontexts
should be done via the Project context endpoints - Payload (Project):
{
"id": "602392ee1d09a55d6e0384d4",
"name": "Project name",
"description": "Some description",
"numberOfReviewsRequired": 3,
"contexts": [
{
"name": "NAME",
"description": "Some description",
"datasources": [
"atlas",
"uniprot",
"gwas",
...
],
"ontologies": [
"efo",
"mondo",
"hp",
"ordo",
...
],
"preferredMappingOntologies": [ "efo" ],
"graphRestriction" : {
"classes" : [ "EFO:0004446", "GO:0007049", "GO:0022403"] // MANDATORY - curies
"relations: [ "rdfs:subClassOf" ], // MANDATORY
"direct": true | false,
"include_self": true | false
}
},
...
],
"created": {
"timestamp": "2021-02-10T16:01:50.131+08:00",
"user": {
"name": "User name",
"email": "User email"
}
}
}
- Response (Project):
200 | OK
{
"id": "602392ee1d09a55d6e0384d4",
"name": "Project name",
"description": "Some description",
"numberOfReviewsRequired": 3,
"contexts": [
{
"name": "NAME",
"description": "Some description",
"datasources": [
"atlas",
"uniprot",
"gwas",
...
],
"ontologies": [
"efo",
"mondo",
"hp",
"ordo",
...
],
"preferredMappingOntologies": [ "efo" ],
"graphRestriction" : {
"classes" : [ "EFO:0004446", "GO:0007049", "GO:0022403"] // MANDATORY - curies
"relations: [ "rdfs:subClassOf" ], // MANDATORY
"direct": true | false,
"include_self": true | false
}
},
...
],
"created": {
"timestamp": "2021-02-10T16:01:50.131+08:00",
"user": {
"name": "User name",
"email": "User email"
}
}
}
OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it
- Note: The semantics of the downstream implications for this operation has not been defined yet.
- Endpoint:
DELETE /v1/projects/{projectId}
- Response
200 | OK
OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it