Application programming interface (API)

The web application API (Application Programming Interface) allows to browse and download for further processing the full range of data and metadata for all indicators.
The data is made available through REST API in JSON format. The list below presents available web services provided as part of the API.

Response status codes

Status code Definition Message
200 OK The request was successful and the response body contains the representation requested
302 FOUND A common redirect response; you can GET the representation at the URI in the Location response header
304 NOT MODIFIED There is no new data to return
400 BAD REQUEST The request was invalid or cannot be otherwise served
401 UNAUTHORIZED The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource
403 FORBIDDEN The request has been refused
404 NOT FOUND The URI requested is invalid or the resource requested does not exists
406 NOT ACCEPTABLE The request specified an invalid format
410 GONE This resource is gone
500 INTERNAL SERVER ERROR Something is horribly wrong
502 BAD GATEWAY The service is down or being upgraded
503 SERVICE UNAVAILABLE The service is up, but overloaded with requests
504 GATEWAY TIMEOUT Servers are up, but the request couldn’t be serviced due to some failure within our stack

Limits and API key

For API security reasons, quantitative limits are imposed on the number of requests. For unauthenticated requests, the rate limit allows for up to 60 requests per hour. For API requests using OAuth, you can make up to 5000 requests per hour. To use OAuth, you need to create account on Github and generate personal access token in developer settings. Then set the Authorization header with token in your request. For example:

curl -H "Accept:application/vnd.github.v3.raw" -H "Authorization: token generated_token" "https://api.github.com/repos/statisticspoland/EU_Big_Data_Hackathon_2021/api/v1/globalne/1/4-1-1.json"

For more information, please visit:
help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
developer.github.com/v3/auth/

GET /api/v1/global/1/{num}.json Download global indicator

This method allows users to download data and metadata for chosen global indicator in English.

Parameters

Response content type

Curl example

curl -H "Accept:application/vnd.github.v3.raw" "https://api.github.com/repos/statisticspoland/EU_Big_Data_Hackathon_2021/contents/api/v1/globalne/1/4-1-1.json"

URL example

https://api.github.com/repos/statisticspoland/EU_Big_Data_Hackathon_2021/contents/api/v1/globalne/1/4-1-1.json

Response code

200

Response