Security and access endpoints
/api/v2/authorizationsList authorizations
Lists authorizations.
To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations.
InfluxDB Cloud
- InfluxDB Cloud doesn’t expose API token
values in
GET /api/v2/authorizationsresponses; returnstoken: redactedfor all authorizations.
Required permissions
To retrieve an authorization, the request must use an API token that has the following permissions:
read-authorizationsread-userfor the user that the authorization is scoped to
Related guides
Parameters
Query parameters
userID
stringuser
stringorgID
stringorg
stringtoken
stringAn API token value.
Specifies an authorization by its token property value
and returns the authorization.
InfluxDB OSS v2
- Doesn’t support this parameter. InfluxDB OSS ignores the
token=parameter, applies other parameters, and then returns the result.
Limitations
- The parameter is non-repeatable. If you specify more than one, only the first one is used. If a resource with the specified property value doesn’t exist, then the response body contains an empty list.
Header parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/authorizations" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Success. The response body contains a list of authorizations.
If the response body is missing authorizations that you expect, check that the API
token used in the request has read-user permission for the users (userID property value)
in those authorizations.
InfluxDB OSS v2
- Warning: The response body contains authorizations with their API token values in clear text.
- If the request uses an operator token, InfluxDB OSS returns authorizations for all organizations in the instance.
authorizations
object[]links
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/authorizationsCreate an authorization
Creates an authorization and returns the authorization with the generated API token.
Use this endpoint to create an authorization, which generates an API token
with permissions to read or write to a specific resource or type of resource.
The API token is the authorization’s token property value.
To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens.
- InfluxDB allows access to the API token value immediately after the authorization is created.
- You can’t change access (read/write) permissions for an API token after it’s created.
- Tokens stop working when the user who created the token is deleted.
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.
Required permissions
write-authorizationswrite-userfor the user that the authorization is scoped to
Related guides
Parameters
Header parameters
Zap-Trace-Span
stringRequest body required
application/jsoncurl --request POST \
"http://localhost:8086/api/v2/authorizations" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json"Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/authorizations/{authID}Retrieve an authorization
Retrieves an authorization.
Use this endpoint to retrieve information about an API token, including the token’s permissions and the user that the token is scoped to.
InfluxDB OSS v2
- InfluxDB OSS returns API token values in authorizations.
- If the request uses an operator token, InfluxDB OSS returns authorizations for all organizations in the instance.
Related guides
Parameters
Path parameters
authID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/authorizations/{authID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/authorizations/{authID}Update an API token to be active or inactive
Updates an authorization.
Use this endpoint to set an API token’s status to be active or inactive. InfluxDB rejects requests that use inactive API tokens.
Parameters
Path parameters
authID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsondescription
stringstatus
stringinactive, InfluxDB rejects requests that use the token.active
, inactiveactivecurl --request PATCH \
"http://localhost:8086/api/v2/authorizations/{authID}" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"description": "DESCRIPTION",
"status": "active"
}'Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/authorizations/{authID}Delete an authorization
Deletes an authorization.
Use the endpoint to delete an API token.
If you want to disable an API token instead of delete it,
update the authorization’s status to inactive.
Parameters
Path parameters
authID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/authorizations/{authID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgsList organizations
Lists organizations.
To limit which organizations are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all organizations up to the default limit.
InfluxDB Cloud
- Only returns the organization that owns the token passed in the request.
Related guides
Parameters
Query parameters
offset
integerThe offset for pagination. The number of records to skip.
For more information about pagination parameters, see Pagination.
limit
integer20.20descending
booleanorg
stringorgID
stringuserID
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/orgs" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
stringorgs
object[]Bad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}Retrieve an organization
Retrieves an organization.
Use this endpoint to retrieve information for a specific organization.
Related guides
Parameters
Path parameters
orgID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/orgs/{orgID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
createdAt
string <date-time>defaultStorageType
stringtsm
, ioxdescription
stringid
stringlinks
object{"buckets":"/api/v2/buckets?org=myorg","dashboards":"/api/v2/dashboards?org=myorg","labels":"/api/v2/orgs/1/labels","members":"/api/v2/orgs/1/members","owners":"/api/v2/orgs/1/owners","secrets":"/api/v2/orgs/1/secrets","self":"/api/v2/orgs/1","tasks":"/api/v2/tasks?org=myorg"}buckets
stringdashboards
stringlabels
stringmembers
stringowners
stringsecrets
stringself
stringtasks
stringname
required
stringstatus
stringactive
, inactiveactiveupdatedAt
string <date-time>Unauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}/membersList all members of an organization
Lists all users that belong to an organization.
InfluxDB users have permission to access InfluxDB.
Members are users within the organization.
InfluxDB Cloud
- Doesn’t use
ownerandmemberroles. Use/api/v2/authorizationsto assign user permissions.
Limitations
- Member permissions are separate from API token permissions.
- Member permissions are used in the context of the InfluxDB UI.
Required permissions
read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID is the ID of the organization that you want to retrieve
members for.
Related guides
Parameters
Path parameters
orgID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/orgs/{orgID}/members" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
objectself
string <uri>users
object[]Bad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}/members/{userID}Remove a member from an organization
Removes a member from an organization.
Use this endpoint to remove a user’s member privileges for an organization.
Removing member privileges removes the user’s read and write permissions
from the organization.
InfluxDB Cloud
- Doesn’t use
ownerandmemberroles. Use/api/v2/authorizationsto assign user permissions.
Limitations
- Member permissions are separate from API token permissions.
- Member permissions are used in the context of the InfluxDB UI.
Required permissions
write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID is the ID of the organization that you want to remove an
owner from.
Related guides
Parameters
Path parameters
userID
required
stringorgID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/orgs/{orgID}/members/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Unauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}/ownersList all owners of an organization
Lists all owners of an organization.
InfluxDB Cloud
- Doesn’t use
ownerandmemberroles. Use/api/v2/authorizationsto assign user permissions.
Required permissions
read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID is the ID of the organization that you want to retrieve a
list of owners from.
Parameters
Path parameters
orgID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/orgs/{orgID}/owners" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
objectself
string <uri>users
object[]code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}/owners/{userID}Remove an owner from an organization
Removes an owner from the organization.
Organization owners have permission to delete organizations and remove user and member permissions from the organization.
InfluxDB Cloud
- Doesn’t use
ownerandmemberroles. Use/api/v2/authorizationsto assign user permissions.
Limitations
- Owner permissions are separate from API token permissions.
- Owner permissions are used in the context of the InfluxDB UI.
Required permissions
write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID is the ID of the organization that you want to
remove an owner from.
Related endpoints
Parameters
Path parameters
userID
required
stringorgID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/orgs/{orgID}/owners/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Unauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}/secretsList all secret keys for an organization
Parameters
Path parameters
orgID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/orgs/{orgID}/secrets" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}/secrets/{secretID}Delete a secret from an organization
Parameters
Path parameters
orgID
required
stringsecretID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/orgs/{orgID}/secrets/{secretID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/orgs/{orgID}/secrets/deleteDelete secrets from an organization
Parameters
Path parameters
orgID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonsecrets
string[]curl --request POST \
"http://localhost:8086/api/v2/orgs/{orgID}/secrets/delete" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"secrets": [
"example"
]
}'Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/signinCreate a user session.
Authenticates Basic authentication credentials for a user, and then, if successful, generates a user session.
To authenticate a user, pass the HTTP Authorization header with the
Basic scheme and the base64-encoded username and password.
For syntax and more information, see Basic Authentication for
syntax and more information.
If authentication is successful, InfluxDB creates a new session for the user
and then returns the session cookie in the Set-Cookie response header.
InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance.
User sessions with authorizations
- In InfluxDB Cloud, a user session inherits all the user’s permissions for the organization.
- In InfluxDB OSS, a user session inherits all the user’s permissions for all the organizations that the user belongs to.
Related endpoints
Parameters
Header parameters
Zap-Trace-Span
stringcurl --request POST \
"http://localhost:8086/api/v2/signin" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Set-Cookie response header contains the session cookie.Unauthorized. This error may be caused by one of the following problems:
- The user doesn’t have access.
- The user passed incorrect credentials in the request.
- The credentials are formatted incorrectly in the request.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/signoutExpire a user session
Expires a user session specified by a session cookie.
Use this endpoint to expire a user session that was generated when the user
authenticated with the InfluxDB Developer Console (UI) or the POST /api/v2/signin endpoint.
For example, the POST /api/v2/signout endpoint represents the third step
in the following three-step process
to authenticate a user, retrieve the user resource, and then expire the session:
- Send a request with the user’s Basic authentication credentials
to the
POST /api/v2/signinendpoint to create a user session and generate a session cookie. - Send a request to the
GET /api/v2/meendpoint, passing the stored session cookie from step 1 to retrieve user information. - Send a request to the
POST /api/v2/signoutendpoint, passing the stored session cookie to expire the session.
See the complete example in request samples.
InfluxDB stores user sessions in memory only. If a user doesn’t sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance.
To learn more about cookies in HTTP requests, see Mozilla Developer Network (MDN) Web Docs, HTTP cookies.
Related endpoints
Parameters
Header parameters
Zap-Trace-Span
stringcurl --request POST \
"http://localhost:8086/api/v2/signout" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/usersList users
Lists users.
Default limit is 20.
To limit which users are returned, pass query parameters in your request.
Required permissions for InfluxDB OSS
| Action | Permission required | Restriction |
|---|---|---|
| List all users | Operator token | |
| List a specific user | read-users or read-user USER_ID |
USER_ID is the ID of the user that you want to retrieve.
Related guides
Parameters
Query parameters
offset
integerThe offset for pagination. The number of records to skip.
For more information about pagination parameters, see Pagination.
limit
integer20.20after
stringA resource ID to seek from. Returns records created after the specified record; results don’t include the specified record.
Use after instead of the offset parameter.
For more information about pagination parameters, see Pagination.
name
stringid
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/users" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
users.links
objectself
string <uri>users
object[]code
required
stringinternal 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 typeerr
stringmessage
stringop
stringUnprocessable entity.
The error may indicate one of the following problems:
- The request body isn’t valid–the request is well-formed, but InfluxDB can’t process it due to semantic errors.
- You passed a parameter combination that InfluxDB doesn’t support.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/users/{userID}Retrieve a user
Parameters
Path parameters
userID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/users/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
id
stringlinks
object{"self":"/api/v2/users/1"}self
string <uri>name
required
stringstatus
stringactive
, inactiveactivecode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/users/{userID}/passwordUpdate a password
Updates a user password.
InfluxDB Cloud
- Doesn’t allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password.
Related guides
Parameters
Path parameters
userID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonpassword
required
stringcurl --request POST \
"http://localhost:8086/api/v2/users/{userID}/password" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"password": "PASSWORD"
}'Responses
Bad request.
InfluxDB Cloud
- Doesn’t allow you to manage passwords through the API; always responds with this status.
InfluxDB OSS v2
- Doesn’t understand a value passed in the request.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
string/api/v2/users/{userID}/passwordUpdate a password
Updates a user password.
Use this endpoint to let a user authenticate with Basic authentication credentials and set a new password.
InfluxDB Cloud
- Doesn’t allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password.
Related guides
Parameters
Path parameters
userID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonpassword
required
stringcurl --request PUT \
"http://localhost:8086/api/v2/users/{userID}/password" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"password": "PASSWORD"
}'Responses
Bad request.
InfluxDB Cloud
- Doesn’t allow you to manage passwords through the API; always responds with this status.
InfluxDB OSS v2
- Doesn’t understand a value passed in the request.
code
required
stringinternal 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 typeerr
stringmessage
stringop
stringcode
required
stringinternal 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 typeerr
stringmessage
stringop
stringWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.