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

Unpublished Studies Rest API Endpoint to Get All Unpublished Studies Data #67

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

Comments

@sprintell
Copy link
Member

sprintell commented Sep 20, 2024

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

{
   "createdDate":"2022-05-24T18:37:40.000+0000",
   "file":"/GCST90103910/",
   "study_tag":"UKB-CSA_PUFA_TFAP",
   "study_accession":"GCST90103910",
   "genotyping_technology":"Genome-wide genotyping array",
   "array_manufacturer":null,
   "array_information":null,
   "imputation":true,
   "variant_count":7812716,
   "sample_description":null,
   "statistical_model":null,
   "study_description":null,
   "trait":"Polyunsaturated Fatty Acids to Total Fatty Acids percentage",
   "efo_trait":null,
   "background_trait":"-",
   "background_efo_trait":null,
   "checksum":"9293978db165814bd7cdca7813872f7b",
   "summary_statistics_file":"UKBCSA-PUFAs_TFAP.tsv",
   "submission_id":"628d25f48b8c550001f59a1c",
   "globus_folder":"da6fc762-d791-40a5-a982-755e27e06560",
   "summary_statistics_assembly":"GRCh37",
   "cohort":"UKB",
   "cohort_id":null,
   "agreed_to_cc0":true,
   "_links":{
  	"self":{
     	"href":"{base_url}/rest/api/v2/unpublished-studies/{studyId}"
  	},
  	"unpublished-ancestries":{
     	"href":"{base_url}/rest/api/v2/unpublished-studies/{studyId}/unpublished-ancestries"
  	}
   }
}

Search Parameters:
body-of-work-id

Management Rules

  • Rule 1: Endpoint - rest/api/v2/unpublished-studies
  • Rule 2: HTTP Request Method - GET
  • Rule 3: Endpoint should accept pagination, size parameters as in /v2/unpublished-studies?page=0&size=20&sort=…
  • Rule 6: Endpoints should be cached based on request parameters to amplify query speed

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

1 participant