EBISPOT / gwas-ui

Apache License 2.0
5 stars 4 forks source link

Sumstats Studies -Rest endpoint to get all studies resources associated with Sumstats #318

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 with Sumstats is returned in JSON Format

Management Rules: Rule 1: Endpoint - /v2/summaryStatistics/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

@ala-ebi The Uri for Sumstats table is

Uri -: http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/summaryStatistics/studies

The Search & Sort Params are same as Studies table