Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

InfluxDB Authorizations (API tokens) API

Create and manage authorizations (API tokens).An _authorization_ contains a list of `read` and `write`permissions for organization resources and provides an API token for authentication.An authorization belongs to an organization and only contains permissions for that organization.We recommend the following for managing your tokens:- Create a generic user to create and manage tokens for writing data.- Store your tokens in a secure password vault for future access.### User sessions with authorizationsOptionally, when creating an authorization, you can scope it to a specific user.If the user signs in with username and password, creating a _user session_,the session carries the permissions granted by all the user's authorizations.For more information, see [how to assign a token to a specific user](https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/).To create a user session, use the [`POST /api/v2/signin` endpoint](#operation/PostSignin).### Related endpoints- [Signin](#tag/Signin)- [Signout](#tag/Signout)### Related guides- [Authorize API requests](https://docs.influxdata.com/influxdb/cloud/api-guide/api_intro/#authentication)- [Manage API tokens](https://docs.influxdata.com/influxdb/cloud/security/tokens/)- [Assign a token to a specific user](https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/)

InfluxDB Authorizations (API tokens) API is one of 40 APIs that InfluxDB publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Authorizations (API tokens). The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, authentication docs, and a getting-started guide.

This API exposes 5 operations across 2 paths, and defines 10 schemas. It is described by OpenAPI 3.0.0.

Requests are made against the base URL https://cloud2.influxdata.com/api/v2.

5 operations 2 paths 10 schemas 1 DELETE2 GET1 PATCH1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
Base URL
https://cloud2.influxdata.com/api/v2
Authentication
HTTP Basic, API Key
Resource Areas
1

Authentication & Security 2

InfluxDB Authorizations (API tokens) API declares 2 security schemes for authenticating requests. It accepts HTTP basic authentication (BasicAuthentication). An API key is passed in the header as Authorization (TokenAuthentication). By default, every request must be authenticated.

  • BasicAuthentication — Basic authentication scheme Use the HTTP Basic authentication scheme for InfluxDB /api/v2 API operations that support it: Syntax Authorization: Basic BASE64ENC…
  • TokenAuthentication — Use the [Token authentication](section/Authentication/TokenAuthentication) scheme to authenticate to the InfluxDB API. In your API requests, send an Authorizat…

Paths & Operations 5

Across 2 paths, the API surfaces 5 operations — 1 DELETE, 2 GET, 1 PATCH, 1 POST. Each is listed below with its method, path, parameters, and response codes.

Authorizations (API tokens) 5

Create and manage authorizations (API tokens). An authorization contains a list of read and write permissions for organization resources and provides an API token for authenticati…

GET
/api/v2/authorizations
List authorizations
GetAuthorizations 6 params → 200400401500default
POST
/api/v2/authorizations
Create an authorization
PostAuthorizations 1 param body → 201400401500default
DELETE
/api/v2/authorizations/{authID}
Delete an authorization
DeleteAuthorizationsID 2 params → 204400401404500default
GET
/api/v2/authorizations/{authID}
Retrieve an authorization
GetAuthorizationsID 2 params → 200400401404500default
PATCH
/api/v2/authorizations/{authID}
Update an API token to be active or inactive
PatchAuthorizationsID 2 params body → 200default

Schemas 10

The contract defines 10 schemas that model the data the API accepts and returns. The most detailed are Resource (5 properties), Error (4 properties), Links (3 properties), AuthorizationUpdateRequest (2 properties). Each schema is shown below with its type and property counts.

Permission
object
2 properties 2 required
Links
object
URI pointers for additional paged results.
3 properties 1 required
Resource
object
5 properties 1 required
Authorization
2 required
Link
string
URI of resource.
Authorizations
object
2 properties
ErrorCode
string
code is the machine-readable error code.
AuthorizationUpdateRequest
object
2 properties
AuthorizationPostRequest
2 required
Error
object
4 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

influxdb-authorizations-api-tokens-api-openapi.yml Raw ↑

Other APIs InfluxDB publishes across the network.

InfluxDB Bucket Schemas API
InfluxDB Buckets API
InfluxDB Cells API
InfluxDB Checks API
InfluxDB Config API
InfluxDB Dashboards API
InfluxDB Data I/O endpoints API
InfluxDB DBRPs API
InfluxDB Delete API
InfluxDB Invokable Scripts API
InfluxDB Labels API
InfluxDB Legacy Authorizations API