Getting your credentials

The credentials for the API are the same as the UI/Dashboard,

  1. Fill the form at Get access
  2. After a few minutes an email will be sent with your credentials: the email provided, a password, the url to access the dashboard and a baseUrl for the API

These credentials can be used to log into the Dashboard or the API.

Using your credentials with the API

The API is authenticated via a Bearer token with 1h expiration. As of this initial release, there’s no refresh mechanism so another token must be requested each 1h period to keep requests authenticated.

There’s 2 separated API paths:

  • The endpoint to login is https://{baseUrl}/api/login
  • The rest of endpoints, that use the Bearer token are of the form https://{baseUrl}/api/v1/<endpoint>

To login and obtain the Bearer token via API run:

  curl -i -XPOST 'https://{baseUrl}/api/login' \
--header 'Content-Type: application/json' \
--data '{ "username": "<email>", "password": "<password>"}'
  
  {"access_token":"eyJhbGciOiJIUzI1NiJ9.eyJpc3Mi...","token_type":"Bearer","expires_in":3600,"username":"<email>"}
  

Ensure the obtained Bearer token in all requests:

  curl -X GET https://{baseUrl}/api/v1/datasets \
  -H "Authorization: Bearer $TOKEN"