ols4
ols4 copied to clipboard
Retrieve multiple terms by ID
Is your feature request related to a problem? Please describe.
As far as I can tell, there is no way to retrieve multiple terms with a single API call, even if you know the ID for all the terms (e.g. the IRI). Is it possible for any of the term lookup endpoints (e.g. /api/terms
) to accept multiple values for IRI, and return all the matching terms
Describe the solution you'd like
The /api/terms
input could accept multiple iri
parameters and return the corresponding terms:
https://www.ebi.ac.uk/ols4/api/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCBITaxon_9615&iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCBITaxon_9913
Additional context
As an end-user of the OLS4 API, I often find myself doing multiple individual lookups of terms to retrieve their details - retrieving multiple terms in one call could benefit and end-users, and presumably also lead to lower resource use by OLS4 instances.