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.
• 0 views
•
link
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.
This is a version of the GET request that appears to work:
https://www.ebi.ac.uk/ols4/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0003770/graph
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.
Log in to answer this question.