Skip to content

Projects endpoints

tudorgroza edited this page Feb 10, 2021 · 14 revisions

TOC

CREATE

  • Endpoint: POST /v1/projects
  • Payload:
{
  "name": "Project name",                  // NOT NULL
  "description": "Some description",
  "datasources": [
    "cttv",
    "sysmicro",
    "atlas",
    "ebisc",
    "uniprot",
    "gwas",
    "cbi",
    "clinvar-xrefs"
  ],
  "ontologies": [
    "efo",
    "mondo",
    "hp",
    "ordo"
  ],
  "preferredMappingOntology": "efo"
}
  • Response:
200 | OK
{
  "id": "602392ee1d09a55d6e0384d4",
  "name": "Project name",
  "description": "Some description",
  "datasources": [
    "cttv",
    "sysmicro",
    "atlas",
    "ebisc",
    "uniprot",
    "gwas",
    "cbi",
    "clinvar-xrefs"
  ],
  "ontologies": [
    "efo",
    "mondo",
    "hp",
    "ordo"
  ],
  "preferredMappingOntology": "efo",
  "created": {                                         // This provenance field (together with <lastUpdated>) is standard across all objects.
    "timestamp": "2021-02-10T16:01:50.131+08:00",      // Timestamp will always have this format.
    "user": {                                          // User information will always be there.
      "name": "User name",
      "email": "User email"
    }
  }
}

RETRIEVE ALL

  • Endpoint: GET /v1/projects
  • Response:
200 | OK
[{
  "id": "602392ee1d09a55d6e0384d4",
  "name": "Project name",
  "description": "Some description",
  "datasources": [
    "cttv",
    "sysmicro",
    "atlas",
    "ebisc",
    "uniprot",
    "gwas",
    "cbi",
    "clinvar-xrefs"
  ],
  "ontologies": [
    "efo",
    "mondo",
    "hp",
    "ordo"
  ],
  "preferredMappingOntology": "efo",
  "created": {                                         // This provenance field (together with <lastUpdated>) is standard across all objects.
    "timestamp": "2021-02-10T16:01:50.131+08:00",      // Timestamp will always have this format.
    "user": {                                          // User information will always be there.
      "name": "User name",
      "email": "User email"
    }
  }
}, ...
]

RETRIEVE ONE

  • Endpoint: GET /v1/projects/{projectId}
  • Response:
200 | OK
{
  "id": "602392ee1d09a55d6e0384d4",
  "name": "Project name",
  "description": "Some description",
  "datasources": [
    "cttv",
    "sysmicro",
    "atlas",
    "ebisc",
    "uniprot",
    "gwas",
    "cbi",
    "clinvar-xrefs"
  ],
  "ontologies": [
    "efo",
    "mondo",
    "hp",
    "ordo"
  ],
  "preferredMappingOntology": "efo",
  "created": {                                         // This provenance field (together with <lastUpdated>) is standard across all objects.
    "timestamp": "2021-02-10T16:01:50.131+08:00",      // Timestamp will always have this format.
    "user": {                                          // User information will always be there.
      "name": "User name",
      "email": "User email"
    }
  }
}

OR

404 | NOT FOUND
  • If projectId is inexistent or user doesn't have access to it

UPDATE

  • Endpoint: PUT /v1/projects/{projectId}
  • Payload:
{
  "id": "602392ee1d09a55d6e0384d4",
  "name": "Project name",
  "description": "Some description",
  "datasources": [
    "cttv",
    "sysmicro",
    "atlas",
    "ebisc",
    "uniprot",
    "gwas",
    "cbi",
    "clinvar-xrefs"
  ],
  "ontologies": [
    "efo",
    "mondo",
    "hp",
    "ordo"
  ],
  "preferredMappingOntology": "efo",
  "created": {                                         // This provenance field (together with <lastUpdated>) is standard across all objects.
    "timestamp": "2021-02-10T16:01:50.131+08:00",      // Timestamp will always have this format.
    "user": {                                          // User information will always be there.
      "name": "User name",
      "email": "User email"
    }
  }
}
  • Response:
200 | OK
{
  "id": "602392ee1d09a55d6e0384d4",
  "name": "Project name",
  "description": "Some description",
  "datasources": [
    "cttv",
    "sysmicro",
    "atlas",
    "ebisc",
    "uniprot",
    "gwas",
    "cbi",
    "clinvar-xrefs"
  ],
  "ontologies": [
    "efo",
    "mondo",
    "hp",
    "ordo"
  ],
  "preferredMappingOntology": "efo",
  "created": {                                         // This provenance field (together with <lastUpdated>) is standard across all objects.
    "timestamp": "2021-02-10T16:01:50.131+08:00",      // Timestamp will always have this format.
    "user": {                                          // User information will always be there.
      "name": "User name",
      "email": "User email"
    }
  }
}

OR

404 | NOT FOUND
  • If projectId is inexistent or user doesn't have access to it

DELETE

  • Endpoint: DELETE /v1/projects/{projectId}
  • Response
200 | OK

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.