Users
/api/v2/meRetrieve the currently authenticated user
Parameters
Header parameters
Zap-Trace-Span
stringcurl --request GET \
"https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/me" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
id
stringlinks
object{"self":"/api/v2/users/1"}self
string <uri>name
required
stringstatus
stringactive
, inactiveactiveUnauthorized. 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/me/passwordUpdate a password
Updates the password for the signed-in user.
This endpoint represents the third step in the following three-step process to let a user with a user session update their password:
- Pass the user’s Basic authentication credentials to the
POST /api/v2/signinendpoint to create a user session and generate a session cookie. - From the response in the first step, extract the session cookie (
Set-Cookie) header. - Pass the following in a request to the
PUT /api/v2/me/passwordendpoint:- The
Set-Cookieheader from the second step - The
Authorization Basicheader with the user’s Basic authentication credentials {"password": "NEW_PASSWORD"}in the request body
- The
InfluxDB Cloud
- Doesn’t let you manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update your password.
Related endpoints
Related guides
Parameters
Header parameters
Zap-Trace-Span
stringRequest body required
application/jsonpassword
required
stringcurl --request PUT \
"https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/me/password" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"password": "PASSWORD"
}'Responses
Bad request.
InfluxDB Cloud
- Doesn’t let you manage user passwords through the API; always responds with this status.
InfluxDB OSS v2
- Doesn’t understand a value passed in the request.
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
string/api/v2/usersList users
Lists users.
To limit which users are returned, pass query parameters in your request.
InfluxDB Cloud
- InfluxDB Cloud doesn’t allow listing all users through the API. Use the InfluxDB Cloud user interface (UI) to manage account information.
Required permissions for InfluxDB Cloud
| Action | Permission required | Restriction |
|---|---|---|
| List all users | Operator token | InfluxData internal use only |
| 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
Header parameters
Zap-Trace-Span
stringcurl --request GET \
"https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/users" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Success. The response contains a list of users.
InfluxDB Cloud
- Returns an empty
userslist if you don’t passidornameparameters and don’t use an operator token. Only InfluxData can access InfluxDB Cloud operator tokens.
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/usersCreate a user
(InfluxData internal use only)
Creates and returns a user that can access InfluxDB.
InfluxDB Cloud
- InfluxDB Cloud Doesn’t let you manage users through the API. Use the InfluxDB Cloud user interface (UI) to manage account information.
Required permissions for InfluxDB Cloud
| Action | Permission required | Restriction |
|---|---|---|
| Create user | Operator token | InfluxData internal use only |
Related guides
Parameters
Header parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
stringname
required
stringorg_id
stringrole
stringowner
, memberstatus
stringactive
, inactiveactivecurl --request POST \
"https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/users" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME",
"org_id": "ORG_ID",
"role": "owner",
"status": "active"
}'Responses
id
stringlinks
object{"self":"/api/v2/users/1"}self
string <uri>name
required
stringstatus
stringactive
, inactiveactiveUnauthorized.
InfluxDB Cloud
- Returns this error if the request doesn’t use an operator token. Only InfluxData can access InfluxDB Cloud operator tokens.
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 \
"https://us-east-1-1.aws.cloud2.influxdata.com/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}Update a user
(InfluxData internal use only)
Updates a user and returns the user.
InfluxDB Cloud
- Doesn’t let you manage users through the API. Use the InfluxDB Cloud user interface (UI) to manage account information.
Required permissions for InfluxDB Cloud
| Action | Permission required | Restriction |
|---|---|---|
| Update user | Operator token | InfluxData internal use only |
Related guides
Parameters
Path parameters
userID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
stringname
required
stringorg_id
stringrole
stringowner
, memberstatus
stringactive
, inactiveactivecurl --request PATCH \
"https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/users/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME",
"org_id": "ORG_ID",
"role": "owner",
"status": "active"
}'Responses
id
stringlinks
object{"self":"/api/v2/users/1"}self
string <uri>name
required
stringstatus
stringactive
, inactiveactiveBad 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/users/{userID}Delete a user
(InfluxData internal use only)
Deletes a user.
For security purposes, once an InfluxDB user account is deleted from an organization, the user (and their token) cannot be reactivated.
InfluxDB Cloud
- Doesn’t let you manage users through the API. Use the InfluxDB Cloud user interface (UI) to manage account information.
Required permissions
| Action | Permission required | Restriction |
|---|---|---|
| Delete user | Operator token | InfluxData internal use only |
Related guides
Parameters
Path parameters
userID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/users/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
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/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 \
"https://us-east-1-1.aws.cloud2.influxdata.com/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 \
"https://us-east-1-1.aws.cloud2.influxdata.com/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.