Manage resource tokens
Manage resource tokens in your InfluxDB 3 Enterprise instance. Resource tokens grant fine-grained permissions on resources, such as databases and system information endpoints in your InfluxDB 3 Enterprise instance.
Databases: Database tokens allow for actions like writing and querying data.
System resources: System information tokens allow read access to server runtime statistics and health. Access controls for system information API endpoints help prevent information leaks and attacks (such as DoS).
Create a resource token
Use the influxdb3 create token --permission
command or the HTTP API to create fine-grained permissions tokens that grant access to resources such as databases and system information. Database tokens allow for reading and writing data in your InfluxDB 3 Enterprise instance. System tokens allow for reading system information and metrics for your server.
CLI
influxdb3 create token --permission \
--token ADMIN_TOKEN \
--expiry 1y \
--name "Read-write on DATABASE1, DATABASE2" \
db:DATABASE1,DATABASE2:read,write
HTTP API
"http://localhost:8181/api/v3/enterprise/configure/token" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer ADMIN_TOKEN" \
--data '{
"token_name": "Read-write for DATABASE1, DATABASE2",
"permissions": [{
"resource_type": "db",
"resource_identifier": ["DATABASE1","DATABASE2"],
"actions": ["read","write"]
}],
"expiry_secs": 300000
}'
List resource tokens
Use the influxdb3 show tokens
command to list resource tokens in your InfluxDB 3 Enterprise instance.
CLI
influxdb3 show tokens \
--token ADMIN_TOKEN
--host http://localhost:8181
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 Enterprise and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.