Quick start
Use the InfluxDB 3 Cloud Dedicated Management API to create databases, issue database tokens, and configure your cluster programmatically.
Prerequisites: A management token. Generate one with influxctl:
influxctl management create --format=jsonSet environment variables for the examples below:
export ACCOUNT_ID="ACCOUNT_ID"
export CLUSTER_ID="CLUSTER_ID"
export MANAGEMENT_TOKEN="MANAGEMENT_TOKEN"List databases in your cluster.
curl "https://console.influxdata.com/api/v0/accounts/${ACCOUNT_ID}/clusters/${CLUSTER_ID}/databases" \ --header "Authorization: Bearer ${MANAGEMENT_TOKEN}"Create a database.
curl "https://console.influxdata.com/api/v0/accounts/${ACCOUNT_ID}/clusters/${CLUSTER_ID}/databases" \ --request POST \ --header "Authorization: Bearer ${MANAGEMENT_TOKEN}" \ --header "Content-Type: application/json" \ --data '{"name": "sensors"}'Create a database token with read and write access.
curl "https://console.influxdata.com/api/v0/accounts/${ACCOUNT_ID}/clusters/${CLUSTER_ID}/tokens" \ --request POST \ --header "Authorization: Bearer ${MANAGEMENT_TOKEN}" \ --header "Content-Type: application/json" \ --data '{ "description": "Read/write token for sensors", "permissions": [ {"action": "read", "resource": "sensors"}, {"action": "write", "resource": "sensors"} ] }'
Use the database token returned in step 3 to authenticate writes and queries to the Data API.
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 Cloud Dedicated and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.