wiki

Api Keys

API Keys


API Keys panel allows you to create a Leon API key directly from the interface in order to obtain or modify different kinds of data from Leon for the purpose of internal operator integrations.

API Keys.jpg


This panel allows to generate a Refresh Token (API Key), which is a special kind of token that can be used to obtain a renewed access token which allows programmatically accessing a protected resource. Access tokens are attached to API requests. More information can be found in the documentation (https://apidoc.leonsoftware.com/).

The token can be generated only by admins in Settings -> API keys page.

How to generate a token

  1. Click the add-key-button.png button.

  2. Enter the name, description, and the usage purpose of the API key/Refresh token.

    1. The Usage purpose field is mandatory, requires min 200 characters, and contains the API Key Usage Terms under the info icon, which explain the purpose and correct applicability of an API Key

  3. Select resources which can be accessed by using the token. Next to each resource name there’s a question mark; hovering over it displays details of the particular resource.

  4. Select the tail(s) for which the data should be exported. By default, API key access applies to the whole fleet.

  5. Select Service Account for API Key. In general, they are used to identify changes made in the system that are related to particular token use. Click for more details.

  6. Click the generate-key-button.png button.

  7. Copy the generated key and store it safely.

It is also possible to edit existing API Keys and update the Name, Description and Resources and Aircraft access.

Please remember that once the token is generated, it MUST be stored safely as it cannot be retrieved after the pop-up window is closed. As a suggestion, once you have key you can copy/paste it in the ‘Description’ box.


Privileges mapping in API Keys

The file below contains the mapping of Resources in the API Keys section to the relevant GraphQL Permissions in the GraphQL code

privileges_map.xlsx


This list is subject to periodic changes.