Flare’s API is available at https://api.flare.io. Requests are authenticated with API tokens which can be obtained using an API key.

Authentication Objects and Purpose

API Key

Used to generate API tokens. Does not expire.

API Token

Used to access API endpoints. Expires after 1 hour.

Authentication Steps

1 - Obtaining an API key

Users can generate API keys by visiting the Profile page under the “API Keys” section.

Sidebar -> Configure -> Profile -> API Keys (bottom)

API keys are associated to a user and will have the same permissions as the user that generated them:

  • If you can access a tenant, the API key will have access to that tenant.
  • If you are an organization administrator, the API key will have organization administrator access.

2 - Obtaining an API Token

API tokens are obtained using Flare API keys. They can be generated using the tokens/generate

endpoint.

3 - Access an API endpoint

API tokens may then be used using by specifying the Authorization: Bearer <api-token> header.

API tokens can be tested using the tokens/test

endpoint.

Finding tenant IDs

Users can find the IDs of the tenants they have access to by visiting the Profile page under the “Tenants” section.

Sidebar -> Configure -> Profile -> Tenants

End-to-End Examples

These are end-to-end examples in various programming languages.