Search…
⌃K

API Reference

.With this API reference, you can explore and interact with all the endpoints of the AirQo API.
This documentation shares the RESTful api endpoints provided by AirQo for retrieving measurements and device metadata from the AirQo monitoring network.

The BASE URL

https://api.airqo.net/api/{VERSION_NUMBER}

Authentication

As a first step, you need to request access to the platform. You can create an account by requesting access on the website: https://airqo.net. After gaining access, you can access your access token using your newly acquired user credentials accordingly.
In case you already had an account, you can just use those user credentials accordingly to access your token which you will use for the endpoints. Using a RESTful client of your choice, access the following POST endpoint
https://api.airqo.net/api/v1/users/loginUser?tenant=airqo
JSON BODY:
{
"userName":"",
"password":""
}
For each HTTP request, you will need to add a HEADER of every API request accordingly. Potential developers should request for an account using support.airqo.net or request access tab on the AirQo website.
This access token is different for each developer that requests for access. Each key has an extended period of expiry that is unique for each user.
On expiry of the token, a user can just request for a new one using their user credentials or a refresh token provided them on first sign up.
A short recap
  1. 1.
    Generate a TOKEN
  2. 2.
    Token will be in the response body
  3. 3.
    Add the token to your request as an Authorization HEADER
post
https://api.airqo.net
/api/v1/users/loginUser
Request for an authorisation token
get
https://api.airqo.net
/api/v1/devices/events
Get Device Measurements
get
https://api.airqo.net
/api/v1/devices
GET devices
get
https://api.airqo.net
/api/v2/devices/events
(Version 2) Get Device Measurements
For support, please reach out to [email protected] to report bugs. We will also appreciate any feedback you would like to share with us!
Last modified 3mo ago