Application Programming Interface (API) for BIRA-IASB data
How to obtain an API key
Our API requires the use of Bearer Authentication.
Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens.
The name “Bearer authentication” can be understood as “give access to the bearer of this token.”
The bearer token is a cryptic string, usually generated by the server in response to a login request.
The client must send this token in the Authorization header when making requests to protected resources;
for example, to get the content of one of our data products, you would use the cURL command:
$ curl -X GET -H "Authorization: Bearer 10|FHoQmHs23GWJRxE3oEUJEp0Zc6MRGab2LSMAHRcV5fc00000" -H "Accept:application/json" "https://api.aeronomie.be/api/data/e420266d-8ed8-4ed0-a780-9e923be1b245/2018/05"
We use this Bearer Authentication to monitor and control access to our products and services.
How to obtain an API key
-
Create an account on api.aeronomie.be
$ curl -X POST -F name="Jane Doe" -F email="jane.doe@company.com" -F password="S0m3P@ssw0rd" -H "Accept:application/json"
"https://api.aeronomie.be/api/register"
{"data":200,"message":"Registered","status":200}
You will receive an email to verify your account. Please click Verify Email Address in the mail message.
-
Login to obtain an API key
$ curl -X POST -F email="jane.doe@company.com" -F password="S0m3P@ssw0rd" -H "Accept:application/json"
"https://api.aeronomie.be/api/login"
{"data":{"token":"10|FHoQmHs23GWJRxE3oEUJEp0Zc6MRGab2LSMAHRcV5fc00000"},"message":"Authenticated","status":200}
Record this key, you will need it later.
When you repeat this command, your old key will be deleted and you will receive a new key.
Do not forget to update the keys you're using in your scripts
-
Use your API key to access the data
$ curl -X GET -H "Authorization: Bearer 10|FHoQmHs23GWJRxE3oEUJEp0Zc6MRGab2LSMAHRcV5fc00000" -H "Accept:application/json" "https://api.aeronomie.be/api/data/e420266d-8ed8-4ed0-a780-9e923be1b245/2018/05"
Accessing protected data
Endpoints marked by a
shield_lock on our
Data and
Runners pages
are protected, those are available to a selected audience only, or are not yet publicly released.
-
Request access to a protected URL
Make sure you already have a valid API key, then issue the command:
$ curl -X GET -H "Authorization: Bearer 10|FHoQmHs23GWJRxE3oEUJEp0Zc6MRGab2LSMAHRcV5fc00000" -H "Accept:application/json"
"https://api.aeronomie.be/api/requestaccess?url=https://api.aeronomie.be/api/runners/cp_l2"
Email to data owner sent successfully.
Upon confirmation of your request, you will receive an email.
Retrieving data (or using a service) on api.aeronomie.be
$ curl -X GET -H "Authorization: Bearer 10|FHoQmHs23GWJRxE3oEUJEp0Zc6MRGab2LSMAHRcV5fc00000" -H "Accept:application/json"
"https://api.aeronomie.be/api/data/5513e61c-2335-4570-a61b-24cf1ff4de0a"