Manage admin tokens
Manage InfluxDB 3 Core admin tokens to authorize server actions, influxdb3
CLI commands, and HTTP API endpoints for your InfluxDB 3 Core instance.
Administrative (admin) tokens provide full system access and management capabilities for your InfluxDB 3 Core instance.
Admin tokens can create, edit, and delete other admin tokens.
InfluxDB 3 Core supports two types of admin tokens:
Operator token: A system-generated administrative token with the name
_admin
.- Cannot be edited or deleted
- Never expires
- Cannot be recreated if lost (future functionality)
- Can be regenerated using the CLI
Named admin token: User-defined administrative tokens with full admin permissions.
- Can be created, edited, and deleted
- Support expiration dates
- Cannot modify or remove the operator token
An InfluxDB 3 Core instance can have one operator token and unlimited named admin tokens.
Create an admin token
Use the influxdb3 create token --admin
command or the HTTP API /api/v3/configure/token/admin
endpoint to create an admin token for your InfluxDB 3 Core instance. An admin token grants access to all actions on the server.
CLI
influxdb3 create token --admin
HTTP API
curl -X POST "http://localhost:8181/api/v3/configure/token/admin" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
List admin tokens
Use the influxdb3
CLI or the /api/v3
HTTP API to list admin tokens for your InfluxDB 3 Core instance. Use the influxdb3 show tokens
command to list all tokens or use SQL to query token metadata directly from the system.tokens
table.
CLI
influxdb3 show tokens
HTTP API
curl -G \
"http://localhost:8181/api/v3/query_sql" \
--data-urlencode "db=_internal" \
--data-urlencode "q=SELECT * FROM system.tokens WHERE permissions = '*:*:*'" \
--header 'Accept: application/json' \
--header "Authorization: Bearer AUTH_TOKEN"
Regenerate an admin token
Use the influxdb3 create token --admin
command or the HTTP API /api/v3/configure/token/admin/regenerate
endpoint to regenerate an operator token for your InfluxDB 3 Core instance. Regenerating an operator token deactivates the previous token.
CLI
influxdb3 create token --admin \
--regenerate
OPERATOR_TOKEN
HTTP API
curl -X POST "http://localhost:8181/api/v3/configure/token/admin/regenerate" \
--header 'Authorization Bearer OPERATOR_TOKEN' \
--header 'Accept: application/json'
--header 'Content-Type: application/json'
Was 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 3 Core and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support. Customers using a trial license can email trial@influxdata.com for assistance.