Users
/api/v2/meRetrieve the currently authenticated user
Parameters
Header parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/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 \
"http://localhost:8086/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.
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/usersCreate a user
Creates a user that can access InfluxDB. Returns the user.
Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces:
- InfluxDB UI
/api/v2/signinInfluxDB API endpoint- InfluxDB CLI
This endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization:
- Create a user: send a
POSTrequest toPOST /api/v2/users. Thenameproperty is required. - Extract the user ID (
idproperty) value from the API response for step 1. - Create an authorization (and API token) for the user: send a
POSTrequest toPOST /api/v2/authorizations, passing the user ID (id) from step 2. - Create a password for the user: send a
POSTrequest toPOST /api/v2/users/USER_ID/password, passing the user ID from step 2.
Required permissions
| Action | Permission required | Restriction |
|---|---|---|
| Create a user | Operator token |
Related guides
Parameters
Header parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
stringname
required
stringstatus
stringinactive, the user is inactive.
Default is active.active
, inactiveactivecurl --request POST \
"http://localhost:8086/api/v2/users" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME",
"status": "active"
}'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
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}Update a user
Updates a user and returns the user.
Required permissions
| Action | Permission required |
|---|---|
| Update a user | write-users or write-user USER_ID |
USER_ID is the ID of the user that you want to update.
Related guides
Parameters
Path parameters
userID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
stringname
required
stringstatus
stringinactive, the user is inactive.
Default is active.active
, inactiveactivecurl --request PATCH \
"http://localhost:8086/api/v2/users/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME",
"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
Deletes a user.
Required permissions
| Action | Permission required |
|---|---|
| Delete a user | write-users or write-user USER_ID |
USER_ID is the ID of the user that you want to delete.
Related guides
Parameters
Path parameters
userID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/users/{userID}" \
--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
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.