EBISPOT / goci-rest

Apache License 2.0
4 stars 1 forks source link

Studies Rest API Endpoint to Get All Studies #54

Open sprintell opened 2 months ago

sprintell commented 2 months ago

As developer I want an API endpoint such that when I send a GET request to the URL, hateoas compliant, paginated list of all studies in the database is returned in JSON Format.

This will be a replacement to the old endpoint https://www.ebi.ac.uk/gwas/rest/api/studies

{
  "initialSampleSize": "...",  
  "replicationSampleSize": "2,698 European ancestry Bipolar disorder cases, 1,649 …",
  "gxe": false,
  "gxg": false,
  "snpCount": 1922309,
  "qualifier": null,
  "imputed": true,
  "pooled": false,
  "studyDesignComment": null,
  "accessionId": "GCST000854",
  "fullPvalueSet": false,
  "userRequested": false,
  "pubmedId": "20971583",
  "platforms": [{}],
  "diseaseTrait": "Suicide risk",
  "genotypingTechnologies": [{}],
  "efo_uri": "EFO_0004229",
  "efoTrait": "Dupuytren Contracture",
  "_links": {
    "self": {
    "href": "{base_url}/v1/studies/GCST000841"
    },
    "ancestries": {
    "href": "{base_url}/v1/studies/GCST000841/ancestries"
    },
    "search": {
    "href": "{base_url}/v1/studies?pubmed_id"
    }
  }
}

Must Have Additional Payload Attributes - These are displayed on the catalog UI:

Management Rules

API Endpoint Search Parameters This search parameter will automatically eliminate the need for 10 redundant endpoints as it was in the old design, listed below. Therefore the /v1/studies endpoint should accept search filter parameters as in /v1/studies?{search_parameter}=

Search Parameters:

Few additional details here

sajo-ebi commented 2 months ago

@sprintell need some clarity on the new fields in API

sprintell commented 1 month ago

@sajo-ebi and @sprintell should investigate in addition of how to enhance this rest end point to handle child trait data ...