Calling the API

The Knowledge Services API is accessed via a URL string which can include the following functions.

  • Searching
    Search the data, combine criteria, filter by look-ups
  • Getting
    Used for getting a single record, all records or child items in a hierarchy
  • Counting
    Counts of documents, organisations and items within categories

The URL string is structured as follows:

https://api.ids.ac.uk/openapi/ site / object / function / parameter / query

Authorisation

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.

Authentication

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.

Using curl:

curl -X GET -H "Accept: application/json" -H "Token-Guid: 9827f62a-8bbc-4d22-96b4-771d08859926" https://api.ids.ac.uk/openapi/eldis/search/documents/short?q=undp

Using cfml:

<cfhttp url="https://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>