Entering edit mode
9 months ago
longoka
▴
40
Does anyone have experience formatting API calls to the Ontology Lookup Service (OLS)?
The Ontology Lookup Service Swagger API documentation
For example, I've been trying to retrieve the graph (and its terms) for the EFO ontology term for diabetic retinopathy (EFO_0003770) using the following statement, but I'm getting a 200 error code:
curl -X 'GET' 'https://www.ebi.ac.uk/ols4/api/ontologies/EFO/terms/EFO_0003770/graph?lang=en' -H 'accept: application/json'
Where am I going wrong? Any help appreciated.
I figured it out; the extended URI needs to be double-encoded.
For example, a colon ':' is '%253A' and a forward slash '/' is '%252F'
Then the call works.