Documentation

influx auth create

The influx auth create creates an API token in InfluxDB.

Usage

influx auth create [flags]

Flags

FlagDescriptionInput typeMaps to ?
-c--active-configCLI configuration to use for commandstring
--configs-pathPath to influx CLI configurations (default ~/.influxdbv2/configs)stringINFLUX_CONFIGS_PATH
-d--descriptionAPI token descriptionstring
-h--helpHelp for the create command
--hide-headersHide table headers (default false)INFLUX_HIDE_HEADERS
--hostHTTP address of InfluxDB (default http://localhost:8086)stringINFLUX_HOST
--http-debugInspect communication with InfluxDB servers.string
--jsonOutput data as JSON (default false)INFLUX_OUTPUT_JSON
-o--orgOrganization name (mutually exclusive with --org-id)stringINFLUX_ORG
--org-idOrganization ID (mutually exclusive with --org)stringINFLUX_ORG_ID
--read-bucketGrant permission to read a specified bucket IDstringArray
--read-bucketsGrant permission to read all organization buckets
--read-checksGrant permission to read checks
--read-dashboardsGrant permission to read dashboards
--read-dbrpsGrant permission to read database retention policy mappings
--read-notificationEndpointsGrant permission to read notificationEndpoints
--read-notificationRulesGrant permission to read notificationRules
--read-orgsGrant permission to read organizations
--read-tasksGrant permission to read tasks
--read-telegrafsGrant permission to read Telegraf configurations
--read-userGrant permission to read organization users
--skip-verifySkip TLS certificate verificationINFLUX_SKIP_VERIFY
-t--tokenAPI tokenstringINFLUX_TOKEN
-u--userUsernamestring
--write-bucketGrant permission to write to specified a bucket IDstringArray
--write-bucketsGrant permission to create and update all organization buckets
--write-checksGrant permission to create checks
--write-dashboardsGrant permission to create and update dashboards
--write-dbrpsGrant permission to create database retention policy mappings
--write-notificationEndpointsGrant permission to create notificationEndpoints
--write-notificationRulesGrant permission to create notificationRules
--write-orgsGrant permission to create and update organizations
--write-tasksGrant permission to create and update tasks
--write-telegrafsGrant permission to create and update Telegraf configurations
--write-userGrant permission to create and update organization users

Examples

Authentication credentials

The examples below assume your InfluxDB host, organization, and token are provided by the active influx CLI configuration. If you do not have a CLI configuration set up, use the appropriate flags to provide these required credentials.

Create an API token with read and write permissions
influx auth create \
  --read-buckets \
  --read-checks \
  --read-dashboards \
  --read-dbrps \
  --read-notificationEndpoints \
  --read-notificationRules \
  --read-orgs \
  --read-tasks \
  --read-telegrafs \
  --read-user \
  --write-buckets \
  --write-checks \
  --write-dashboards \
  --write-dbrps \
  --write-notificationEndpoints \
  --write-notificationRules \
  --write-orgs \
  --write-tasks \
  --write-telegrafs \
  --write-user
Create a token with read and write access to specific buckets
influx auth create \
  --read-bucket 0000000000000001 \
  --read-bucket 0000000000000002 \
  --write-bucket 0000000000000001 \
  --write-bucket 0000000000000002
Create a read-only API token
influx auth create \
  --read-buckets \
  --read-checks \
  --read-dashboards \
  --read-dbrps \
  --read-notificationEndpoints \
  --read-notificationRules \
  --read-orgs \
  --read-tasks \
  --read-telegrafs \
  --read-user

Set your InfluxDB URL

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.