Legacy Authorizations

Download InfluxDB API Spec
GET /legacy/authorizations

List all legacy authorizations

Parameters

Query parameters
userID string
A user ID. Only returns legacy authorizations scoped to the specified user.
user string
A user name. Only returns legacy authorizations scoped to the specified user.
orgID string
An organization ID. Only returns legacy authorizations that belong to the specified organization.
org string
An organization name. Only returns legacy authorizations that belong to the specified organization.
token string
An authorization name token. Only returns legacy authorizations with the specified name.
authID string
An authorization ID. Returns the specified legacy authorization.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/legacy/authorizations" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 Success. The response body contains a list of legacy authorizations.
authorizations object[]
createdAt string <date-time>
description string
A description of the token.
id string
The authorization ID.
links object
Example: {"self":"/api/v2/authorizations/1","user":"/api/v2/users/12"}
self string <uri>
URI of resource.
user string <uri>
URI of resource.
org string
The organization name. Specifies the organization that the token is scoped to.
orgID required string
The organization ID. Specifies the organization that the authorization is scoped to.
permissions required object[]
The list of permissions. An authorization must have at least one permission.
action required string
Allowed: read , write
resource required object
status string
Status of the token. If inactive, InfluxDB rejects requests that use the token.
Allowed: active , inactive
Default: active
token string
The API token. The token value is unique to the authorization. API tokens are used to authenticate and authorize InfluxDB API requests and influx CLI commands–after receiving the request, InfluxDB checks that the token is valid and that the permissions allow the requested action(s).
updatedAt string <date-time>
user string
The user name. Specifies the user that owns the authorization. If the authorization is scoped to a user, the user; otherwise, the creator of the authorization.
userID string
The user ID. Specifies the user that owns the authorization. If scoped, the user that the authorization is scoped to; otherwise, the creator of the authorization.
links object
URI pointers for additional paged results.
next string <uri>
URI of resource.
prev string <uri>
URI of resource.
self required string <uri>
URI of resource.
default Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
POST /legacy/authorizations

Create a legacy authorization

Creates a legacy authorization and returns the legacy authorization.

Required permissions

  • write-users USER_ID if you pass the userID property in the request body.

USER_ID is the ID of the user that you want to scope the authorization to.

Parameters

Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

The legacy authorization to create.
Content-Type: application/json
description string
A description of the token.
orgID required string
The organization ID. Identifies the organization that the authorization is scoped to.
permissions required object[]
The list of permissions that provide read and write access to organization resources. An authorization must contain at least one permission.
action required string
Allowed: read , write
resource required object
id string
A resource ID. Identifies a specific resource.
name string
The name of the resource. Note: not all resource types have a name property.
org string
An organization name. The organization that owns the resource.
orgID string
An organization ID. Identifies the organization that owns the resource.
type required string
A resource type. Identifies the API resource’s type (or kind).
Allowed: authorizations , buckets , dashboards , orgs , tasks , telegrafs , users , variables , secrets , labels , views , documents , notificationRules , notificationEndpoints , checks , dbrp , annotations , sources , scrapers , notebooks , remotes , replications , instance , flows , functions , subscriptions
status string
Status of the token. If inactive, InfluxDB rejects requests that use the token.
Allowed: active , inactive
Default: active
token string
The name that you provide for the authorization.
userID string
The user ID. Identifies the user that the authorization is scoped to.
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/legacy/authorizations" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "description": "DESCRIPTION",
  "orgID": "ORGID",
  "permissions": [
    {
      "action": "read",
      "resource": {}
    }
  ],
  "status": "active",
  "token": "TOKEN",
  "userID": "USERID"
}'

Responses

201 Created. The legacy authorization is created. The response body contains the newly created legacy authorization.
400 Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
401 Unauthorized. The API token passed doesn’t have the permissions necessary for the request.
code string
The HTTP status code description. Default is unauthorized.
Allowed: unauthorized
message string
A human-readable message that may contain detail about the error.
default Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
GET /legacy/authorizations/{authID}

Retrieve a legacy authorization

Parameters

Path parameters
authID required string
The ID of the legacy authorization to get.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/legacy/authorizations/{authID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 Legacy authorization details
default Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
PATCH /legacy/authorizations/{authID}

Update a legacy authorization to be active or inactive

Parameters

Path parameters
authID required string
The ID of the legacy authorization to update.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Legacy authorization to update
Content-Type: application/json
description string
A description of the token.
status string
Status of the token. If inactive, InfluxDB rejects requests that use the token.
Allowed: active , inactive
Default: active
Example request Ask AI about this
curl --request PATCH \
  "http://localhost:8086/legacy/authorizations/{authID}" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "description": "DESCRIPTION",
  "status": "active"
}'

Responses

200 The active or inactive legacy authorization
default Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
DELETE /legacy/authorizations/{authID}

Delete a legacy authorization

Parameters

Path parameters
authID required string
The ID of the legacy authorization to delete.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request DELETE \
  "http://localhost:8086/legacy/authorizations/{authID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

204 Legacy authorization deleted
default Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
POST /legacy/authorizations/{authID}/password

Set a legacy authorization password

Parameters

Path parameters
authID required string
The ID of the legacy authorization to update.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

New password
Content-Type: application/json
password required string
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/legacy/authorizations/{authID}/password" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "password": "PASSWORD"
}'

Responses

204 Legacy authorization password set
default Non 2XX error response from server.
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.

Was this page helpful?

Thank you for your feedback!