Skip to main content

Authorization

Access key is required to work with API. The key can be obtained in your personal account on the platform CityAir in the "Settings" -> "API access keys". Or by contacting technical support team.

Data access.

Access keys are issued per user. Access via API to the equipment, Monitoring Posts and their measurements corresponds to the access in the personal account by the user and his role in each personal account.

RoleRights
AdministratorFull read access to equipment and Posts
OperatorFull read access to equipment and Posts
ObserverAccess to explicitly assigned Monitoring Posts

If you have access to several personal accounts, the reply will contain data from all of them, taking into account the role of the user.

Key transfer on request.

The key is transferred in the HTTP header Authorization. For compatibility with future changes, the key is transferred as Bearer Token.

Example

curl -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" https://mycityair.ru/harvester/v2/Posts

Recommendations.

  • Use https connection when transferring API key.
  • If you suspect that the API key has been compromised, you can issue a new one and delete the old one in your personal account.