Calling the API
The Knowledge Services API is accessed via a URL string which can include the following functions.
Search the data, combine criteria, filter by look-ups
Used for getting a single record, all records or child items in a hierarchy
Counts of documents, organisations and items within categories
http://api.ids.ac.uk/openapi/ site / object / function / parameter / query
Before you can do anything with the API you will have to be authorised with the API service. First you will have to register for an API key. The system will send you an email with a link you need to follow, and then you need to fill in your profile, including agreeing to the Terms and Conditions that cover usage of the API.
You can authenticate your call to the API, using your GUID, in the header of the HTTP GET request.
Below are some examples of how to make an authenticated call to the API.
curl -X GET -H "Accept: application/json" -H "Token-Guid: 9827f62a-8bbc-4d22-96b4-771d08859926" http://api.ids.ac.uk/openapi/eldis/search/documents/short?q=undp
<cfhttp url="http://api.ids.ac.uk/openapi/eldis/search/documents/short?q=undp" method="get" result="getResults"> <cfhttpparam type="header" name="Token-Guid" value="9827f62a-8bbc-4d22-96b4-771d08859926"> </cfhttp>