EBISPOT / goci-rest

Apache License 2.0
4 stars 1 forks source link

Single Nucleotide Polymorphism (SNP) Rest API Endpoint to Get All SNP Data #58

Open sprintell opened 2 months ago

sprintell commented 2 months ago

As developer I want an api endpoint such that that when I send a GET request to the URL, hateoas compliant, paginated list of all SNPs 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/singleNucleotidePolymorphisms

{
   "id":34567,
   "rsId":"rs12019358",
   "merged":0,
   "currentSnp":"",
   "functionalClass":"intergenic_variant",
   "lastUpdateDate":"2023-09-14T13:00:23.399+0000",
   "location":{
      "id":7868,   
      "chromosomeName":"12",
      "chromosomePosition":95867790,
      "region":{
       "name":"12q23.1"
      }
   },
   "_links":{
    "self":{
        "href":"http://localhost:8089/api/single-nucleotide-polymorphisms/rs12019358"
    },
    "locations":{
        "href":"{base_url}/v1/single-nucleotide-polymorphisms/rs12019358/locations"
    },
    "genomic-contexts":{
        "href":"{base_url}/v1/single-nucleotide-polymorphisms/rs12019358/genomic-contexts"
    },
    "search":{
        "href":"{base_url}/v1/single-nucleotide-polymorphisms?fullPvalueSet"
    }
   }
}

Management Rules

API Endpoint Search Parameters A robust search feature be made available as before, but designed in line with REST standards, this will automatically eliminate the need for 10 redundant endpoints as it was in the existing design, listed below. Therefore the /v1/single-nucleotide-polymorphisms endpoint should accept search filter parameters as in /v1/single-nucleotide-polymorphisms?{search_parameter}=

Search Parameter

Additional details here