Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efo Traits Rest API Endpoint to Get All Efo Traits #60

Open
sprintell opened this issue Sep 20, 2024 · 0 comments
Open

Efo Traits Rest API Endpoint to Get All Efo Traits #60

sprintell opened this issue Sep 20, 2024 · 0 comments

Comments

@sprintell
Copy link
Member

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 efoTraits 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/efoTraits

{
   "trait":"celiac disease",
   "uri":"http://www.ebi.ac.uk/efo/EFO_0001060",
   "shortForm":"MONDO_0016320",
   "_links":{
  	"self":{
     	"href":"http://localhost:8089/api/efo-traits/MONDO_0016320"
  	},
  	"search":{
     	"href":"{base_url}/v1/single-nucleotide-polymorphisms?fullPvalueSet"
  	}
   }
}

Management Rules
Rule 1: Endpoint - /v1/efo-traits
Rule 2: HTTP Request Method - GET
Rule 3: Endpoint should accept search, page and sort parameters as in /v1/efo-traits?page=0&size=20&sort=name,desc
Rule 4: Endpoint should be accessible to all
Rule 5: HATEOAS, sorting, pagination, and some search and filter specification
Rule 6: Endpoints should be cached based on request parameters to amplify query speed

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 5 redundant endpoints as it was in the existing design, listed below. Therefore the /v1/efo-traits endpoint should accept search filter parameters as in /v1/efo-traits?{search_parameter}=

Search Parameters:

  • uri
  • shortForm
  • pubmedId
  • trait
  • rsId

Additional details here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants