We are creating an API that will return disease and mapping data that will be displayed on the ESPEN Portal. We will keep these analytical data in tables in a new SQL database.
The preliminary design of the API is based on the various pages on the ESPEN Portal, and the functionality and data they provide.
The API is broken down into three distinct APIs: Data, Cartographies, and Maps. These will be used by the Country, Disease, Search, and Download Data pages on the ESPEN Portal. Click on the links below to checkout the three APIs.
The Data API can be used to retrieve the data. The Cartographies API can be used to retrieve the geographies. The Maps API can be used to retrieve cartographies with the disease/endemicity data blended in, and will be used directly to render the maps dynamically on the ESPEN Portal.
In order to access the ESPEN Platform APIs, you must first request an API key from the administrator. This API key must be passed in as a param in every request to the API. The API key allows us to track usage of the APIs, and see who is using them.
Use the param api_key on every request.
The root domain for the API calls is:
The size of the response can be greatly reduced by taking advantage of gzip compression. Add this header to the request to receive a compressed response. This works across all APIs.
The ESPEN API is composed of 6 different APIs.
There is a high-level overview of what these APIs provide here: