-
Notifications
You must be signed in to change notification settings - Fork 0
Search API Docs
Brandon Davis edited this page Mar 8, 2022
·
20 revisions
Some resources:
- Documentation: https://data.microbiomedata.org/docs
- Study ID lookup: https://data.microbiomedata.org/api/study/gold:Gs0114663
- Sample ID lookup: https://data.microbiomedata.org/api/biosample/gold:Gb0126437
Search payload construction:
POST to https://data.microbiomedata.org/api/biosample/search?offset=0&limit=15
- See what you can search by using https://data.microbiomedata.org/api/summary
- You can also interactively learn how to build search payloads by using the Chrome debug tools network inspector.
Example 1:
{"conditions":[{"value":"gold:Gs0114675","table":"study","op":"==","field":"study_id"}],"data_object_filter":[]}
Example 2:
{"conditions":[{"op":"==","field":"omics_type","value":"Organic Matter Characterization","table":"omics_processing"}],"data_object_filter":[]}
The response JSON structure for most endpoints can be inferred from looking at the TypeScript interfaces.
For example, study search returns a SearchResponse<StudySearchResults>
, which can be interpreted as a SearchResponse
where the generic result slot is typed as StudySearchResults
.