EBISPOT / gwas-ui

Apache License 2.0
5 stars 4 forks source link

Accession Id - Rest Endpoint to retrieve studies based on Gcst #335

Closed sajo-ebi closed 1 year ago

sajo-ebi commented 1 year ago

As developer I want an api endpoint So that when I send a GET request, hateoas, paginated list of all studies associated to a given accessionId in the database is returned in JSON Format

Management Rules: Rule 1: Endpoint - /v2/studies/{accessionId}/studies Rule 2: HTTP Request Method - GET Rule 3: HATEOAS, with filer, sorting, pagination, and sizing Rule 4: Endpoint should accept filter, and sort parameters as in /studies?accession=...&page=0&size=20&sort=...

Rule 5: Search filter should be available for: accession, reported-trait, trait, background-trait, discovery-sample-number, replication-sample-number

Rule 6: Sort feature should be available for: discovery-sample-number, replication-sample-number, association-count, summary-statistics

Rule 7: Returned Study JSON entity must include: Study accession, Reported trait, Trait, Background trait, Discovery sample number and ancestry, Replication sample number and ancestry, Association count, and Summary statistics Availability

Acceptance Tests: Given no parameter When the front end sends a GET request to the endpoint Hateoas compliant list of studies is returned in the specified JSON Format

Given sorting, pagination, and/or some search and filter parameters When the front end sends a GET request to thesame endpoint Hateoas compliant filtered list of studies satisfying the conditions in the url parameter must be returned

sajo-ebi commented 1 year ago

API not needed as details retrieved from existing API & only 1 record retrieved so no performance issue