Update v3 token management docs and add management tokens (#5373)

* new token management structure, updated links

* task-based management token docs

* added related links to influxctl management docs

* remove draft status from management token admin docs

* standardize references to identity provider

* Apply suggestions from code review

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

---------

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
pull/5380/head
Scott Anderson 2024-03-21 13:42:41 -06:00 committed by GitHub
parent 944c628051
commit da1b1105ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
96 changed files with 1088 additions and 331 deletions

View File

@ -1203,7 +1203,7 @@ components:
### Basic authentication scheme
Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests.
When authenticating requests, InfluxDB Clustered checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/).
When authenticating requests, InfluxDB Clustered checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/#database-tokens).
InfluxDB Clustered ignores the `username` part of the decoded credential.
### Syntax
@ -1215,12 +1215,12 @@ components:
Replace the following:
- **`[USERNAME]`**: an optional string value (ignored by InfluxDB Clustered).
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/).
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens).
- Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and then append the encoded string to the `Authorization: Basic` header.
### Example
The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/):
The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/#database-tokens):
```sh
#######################################
@ -1239,7 +1239,7 @@ components:
Replace the following:
- **`DATABASE_NAME`**: your InfluxDB Clustered database
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the database
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the database
scheme: basic
type: http
QuerystringAuthentication:
@ -1264,7 +1264,7 @@ components:
### Example
The following example shows how to use cURL with query string authentication and a [database token](/influxdb/clustered/admin/tokens/).
The following example shows how to use cURL with query string authentication and a [database token](/influxdb/clustered/admin/tokens/#database-tokens).
```sh
#######################################
@ -1284,7 +1284,7 @@ components:
Replace the following:
- **`DATABASE_NAME`**: your InfluxDB Clustered database
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the database
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the database
BearerAuthentication:
type: http
scheme: bearer

View File

@ -224,110 +224,3 @@ setNotificationAsRead = (notificationID, notificationType) => {
Cookies.set(notificationCookieName, notificationsObj);
};
/*
////////////////////////////////////////////////////////////////////////////////
//////////////// Port all old docs cookies to the new structure ////////////////
///////////////// Remove everything below after March 15, 2024 /////////////////
////////////////////////////////////////////////////////////////////////////////
*/
portOldCookies = () => {
preferenceCookies = [
'influx-docs-api-lib',
'influx-docs-sidebar-state',
'influx-docs-theme',
'influxdb_get_started_date',
'influxdb_pref',
'influx-iox-show-wayfinding',
];
notificationCookies = [
'influx-future-of-flux-notification-seen',
'influx-influxdb-clustered-announcement-notification-seen',
'influx-serverless-wip-notification-seen',
'influx-influxdb-3-announcement-notification-seen',
'influx-signing-key-rotation-notification-seen',
'influx-iox-doc-fork-notification-seen',
'influx-tsm-doc-fork-notification-seen',
'influx-iox-wip-notification-seen',
'influx-search-disabled-notification-seen',
'influx-v2-cloud-upgrade-notification-seen',
'influx-v2-ga-notification-seen',
'influx-rc1-upgrade-notification-seen',
];
calloutCookies = ['influxdb_url_selector_seen'];
urlCookies = [
'influxdb_oss_url',
'influxdb_cloud_url',
'influxdb_dedicated_url',
'influxdb_clustered_url',
'influxdb_prev_oss_url',
'influxdb_prev_cloud_url',
'influxdb_prev_dedicated_url',
'influxdb_prev_clustered_url',
'influxdb_custom_url',
];
preferenceCookies.forEach(cookie => {
if (cookie.includes('influx-docs-')) {
newCookieName = cookie.replace(/influx-docs-/, '').replace(/-/, '_');
try {
setPreference(
newCookieName,
Cookies.get(cookie).replace(/-theme|sidebar-/, '')
);
Cookies.remove(cookie);
} catch {}
} else if (cookie === 'influxdb_get_started_date') {
newCookieName = 'sample_get_started_date';
try {
setPreference(newCookieName, Cookies.get(cookie));
Cookies.remove(cookie);
} catch {}
} else if (cookie === 'influx-iox-show-wayfinding') {
newCookieName = 'v3_wayfinding_show';
try {
setPreference(newCookieName, Cookies.get(cookie));
Cookies.remove(cookie);
} catch {}
} else if (cookie === 'influxdb_pref') {
newCookieName = 'influxdb_url';
try {
setPreference(newCookieName, Cookies.get(cookie));
Cookies.remove(cookie);
} catch {}
}
});
notificationCookies.forEach(cookie => {
notificationName = cookie.replace(
/(^influx-)(.*)(-notification-seen$)/,
'$2'
);
if (Cookies.get(cookie) !== undefined) {
setNotificationAsRead(notificationName, 'message');
Cookies.remove(cookie);
}
});
calloutCookies.forEach(cookie => Cookies.remove(cookie));
urlCookies.forEach(cookie => {
newUrlKey = cookie.replace(/(^influxdb_)(.*)(_url)/, '$2');
try {
urlObj = {};
urlObj[newUrlKey] = Cookies.get(cookie);
setInfluxDBUrls(urlObj);
Cookies.remove(cookie);
} catch {}
});
};
if (Cookies.get('influxdata_docs_ported') === undefined) {
portOldCookies();
Cookies.set('influxdata_docs_ported', true, {
expires: new Date('2024-03-15T00:00:00Z'),
});
}

View File

@ -18,3 +18,7 @@
}
& > hr:last-child {display: none}
}
ul.children-list + ul {
margin-top: -1.25rem;
}

View File

@ -56,7 +56,7 @@ The `influxctl query` command only supports SQL queries; not InfluxQL.
Provide the following with your command:
- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/)
- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the queried database. Uses the `token` setting from
the [`influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles)
or the `--token` command flag.

View File

@ -14,14 +14,27 @@ aliases:
- /influxdb/cloud-dedicated/security/tokens/
---
InfluxDB uses token authentication to authorize access to data in your InfluxDB
Cloud Dedicated cluster. Each token grants read and write permissions to one or
more databases and allows for actions like writing and querying data.
InfluxDB uses token authentication to authorize access to data in your
{{< product-name omit=" Clustered" >}} cluster.
There are two types of tokens:
All read and write actions performed against time series data in your InfluxDB
Cloud Dedicated cluster must be authorized using a token. Administrative actions
such as managing tokens and databases are authorized using **management tokens**
issued by **Auth0**. Management tokens allow clients, such as the `influxctl` CLI,
- [Database tokens](#database-tokens)
- [Management tokens](#management-tokens)
#### Database tokens
Database tokens grant read and write permissions to one or more databases
and allows for actions like writing and querying data.
All read and write actions performed against time series data in your
{{< product-name omit=" Clustered" >}} cluster must be authorized using a database token.
#### Management tokens
Management tokens grant permission to perform administrative actions such as
managing users, databases, and database tokens.
Management tokens allow clients, such as the
[`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/),
to perform administrative actions.
{{% note %}}

View File

@ -0,0 +1,19 @@
---
title: Manage database tokens
seotitle: Manage database tokens in InfluxDB Cloud Dedicated
description: >
Manage database tokens in your InfluxDB Cloud Dedicated cluster.
Database tokens grant read and write permissions to one or more databases and
allow for actions like writing and querying data.
menu:
influxdb_cloud_dedicated:
parent: Manage tokens
name: Database tokens
weight: 101
influxdb/cloud-dedicated/tags: [tokens]
---
{{< product-name >}} database tokens grant read and write permissions to one or
more databases and allow for actions like writing and querying data.
{{< children >}}

View File

@ -1,12 +1,12 @@
---
title: Create a token
title: Create a database token
description: >
Use the [`influxctl token create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/)
to create a database token for reading and writing data in your InfluxDB Cloud Dedicated cluster.
Provide a token description and permissions for databases.
menu:
influxdb_cloud_dedicated:
parent: Manage tokens
parent: Database tokens
weight: 201
list_code_example: |
```sh
@ -16,6 +16,8 @@ list_code_example: |
--write-database DATABASE2_NAME \
"Read-only on DATABASE1_NAME, Read/write on DATABASE2_NAME"
```
aliases:
- /influxdb/cloud-dedicated/admin/tokens/create/
alt_links:
cloud-serverless: /influxdb/cloud-serverless/admin/tokens/create-token/
---

View File

@ -1,5 +1,5 @@
---
title: Delete a token
title: Delete a database token
description: >
Use the [`influxctl token delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete/)
to delete a token from your InfluxDB Cloud Dedicated cluster and revoke all
@ -7,12 +7,14 @@ description: >
Provide the ID of the token you want to delete.
menu:
influxdb_cloud_dedicated:
parent: Manage tokens
parent: Database tokens
weight: 203
list_code_example: |
```sh
influxctl token delete <TOKEN_ID>
```
aliases:
- /influxdb/cloud-dedicated/admin/tokens/delete/
---
Use the [`influxctl token delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete/)

View File

@ -1,16 +1,18 @@
---
title: List tokens
title: List database tokens
description: >
Use the [`influxctl token list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list/)
to list tokens in your InfluxDB Cloud Dedicated cluster.
menu:
influxdb_cloud_dedicated:
parent: Manage tokens
parent: Database tokens
weight: 202
list_code_example: |
```sh
influxctl token list
```
aliases:
- /influxdb/cloud-dedicated/admin/tokens/list/
---
Use the [`influxctl token list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list/)

View File

@ -1,11 +1,11 @@
---
title: Update a token
title: Update a database token
description: >
Use the [`influxctl token update` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/update/)
to update a database token's permissions in your InfluxDB Cloud Dedicated cluster.
menu:
influxdb_cloud_dedicated:
parent: Manage tokens
parent: Database tokens
weight: 201
list_code_example: |
```sh
@ -15,6 +15,8 @@ list_code_example: |
--write-database <DATABASE2_NAME> \
<TOKEN_ID>
```
aliases:
- /influxdb/cloud-dedicated/admin/tokens/update/
alt_links:
serverless: /influxdb/cloud-serverless/admin/tokens/update-tokens/
---

View File

@ -0,0 +1,81 @@
---
title: Manage management tokens
seotitle: Manage management tokens in InfluxDB Cloud Dedicated
description: >
Manage management tokens in your InfluxDB Cloud Dedicated cluster.
Management tokens grant permission to perform administrative actions such as
managing users, databases, and database tokens.
menu:
influxdb_cloud_dedicated:
parent: Manage tokens
name: Management tokens
weight: 101
influxdb/cloud-dedicated/tags: [tokens]
---
Management tokens grant permission to perform administrative actions such as
managing users, databases, and database tokens in your
{{< product-name omit=" Clustered">}} cluster.
{{% note %}}
Management tokens do _not_ grant permissions to write or query time series data
in your {{< product-name omit=" Clustered">}} cluster.
To grant write or query permissions, use management tokens to create [database tokens](/influxdb/cloud-dedicated/admin/tokens/database/).
{{% /note %}}
By default, management tokens are short-lived tokens issued by an OAuth2 identity
provider that grant a specific user administrative access to your
{{< product-name omit=" Clustered">}} cluster.
However, for automation purposes, you can manually create management tokens that
authenticate directly with your InfluxDB Cluster and do not require human
interaction with your identity provider.
{{% warn %}}
#### For automation use cases only
The tools outlined below are meant for automation use cases and should not be
used to circumvent your identity provider. **Take great care when manually creating
and using management tokens**.
{{< product-name >}} requires at least one user associated with your cluster
and authorized through your OAuth2 identity provider to manually create a
management token.
{{% /warn %}}
{{< children type="anchored-list" >}}
- [Use a management token](#use-a-management-token)
{{< children readmore=true hlevel="h2" hr=true >}}
---
## Use a management token
Use management tokens to automate authorization for the
[`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/):
1. [Create a management token](#create-a-management-token) and securely store the output token value. You'll use it in the next step.
2. On the machine where the `influxctl` CLI is to be automated, update your
[`influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles)
by assigning the `mgmt_token` setting to the token string from the preceding step.
{{% code-placeholders "(ACCOUNT|CLUSTER|MANAGEMENT)_(ID|TOKEN)" %}}
```toml
[[profile]]
name = "default"
product = "dedicated"
account_id = "ACCOUNT_ID"
cluster_id = "CLUSTER_ID"
mgmt_token = "MANAGEMENT_TOKEN"
```
{{% /code-placeholders %}}
Replace the following:
- {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}:
{{< product-name >}} account ID
- {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}:
{{< product-name >}} cluster ID
- {{% code-placeholder-key %}}`MANAGEMENT_TOKEN`{{% /code-placeholder-key %}}:
Management token string

View File

@ -0,0 +1,74 @@
---
title: Create a management token
description: >
Use the [`influxctl management create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/create)
to manually create a management token.
menu:
influxdb_cloud_dedicated:
parent: Management tokens
weight: 201
influxdb/cloud-dedicated/tags: [tokens]
related:
- /influxdb/cloud-dedicated/admin/tokens/management/#use-a-management-token, Use a management token
- /influxdb/cloud-dedicated/reference/cli/influxctl/management/create/
list_code_example: |
```sh
influxctl management create \
--expires-at $(date -v+1d -Iseconds) \
--description "Example token description"
```
---
By default, management tokens are short-lived tokens issued by an OAuth2 identity
provider that grant a specific user administrative access to your
{{< product-name omit=" Clustered">}} cluster.
However, for automation purposes, you can manually create management tokens that
authenticate directly with your InfluxDB cluster and do not require human
interaction with your identity provider.
{{% warn %}}
#### For automation use cases only
The tools outlined below are meant for automation use cases and should not be
used to circumvent your identity provider. **Take great care when manually creating
and using management tokens**.
{{< product-name >}} requires that at least one user associated with your cluster
and authorized through your OAuth2 identity provider to manually create a
management token.
{{% /warn %}}
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl).
2. Use the [`influxctl management create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/create/)
to manually create a management token. Provide the following:
- _Optional_: the `--expires-at` flag with an RFC3339 date string that defines the
token expiration date and time--for example, `{{< datetime/current-date offset=1 >}}`.
If an expiration isn't set, the token does not expire until revoked.
- _Optional_: the `--description` flag with a description for the management token.
{{% code-placeholders "RFC3339_EXPIRATION|TOKEN_DESCRIPTION" %}}
```sh
influxctl management create \
--expire-at RFC3339_EXPIRATION \
--description TOKEN_DESCRIPTION
```
{{% /code-placeholders %}}
Replace the following:
- {{% code-placeholder-key %}}`RFC3339_EXPIRATION`{{% /code-placeholder-key %}}:
An RFC3339 date string to expire the token at--for example,
`{{< datetime/current-date offset=1 >}}`.
- {{% code-placeholder-key %}}`TOKEN_DESCRIPTION`{{% /code-placeholder-key %}}:
Management token description.
Once created, the command returns the management token string.
{{% note %}}
#### Store secure tokens in a secret store
Management token strings are returned _only_ on token creation.
We recommend storing database tokens in a **secure secret store**.
For example, see how to [authenticate Telegraf using tokens in your OS secret store](https://github.com/influxdata/telegraf/tree/master/plugins/secretstores/os).
{{% /note %}}

View File

@ -0,0 +1,126 @@
---
title: List management tokens
description: >
Use the [`influxctl management list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/list/)
to list manually-created management tokens.
menu:
influxdb_cloud_dedicated:
parent: Management tokens
weight: 201
influxdb/cloud-dedicated/tags: [tokens]
related:
- /influxdb/cloud-dedicated/admin/tokens/management/#use-a-management-token, Use a management token
- /influxdb/cloud-dedicated/reference/cli/influxctl/management/list/
list_code_example: |
```sh
influxctl management list --format json
```
---
Use the [`influxctl management list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/list)
to list manually-created management tokens.
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl).
2. Run `influxctl management list` with the following:
- _Optional_: [Output format](#output-formats)
```sh
influxctl management list --format json
```
{{% note %}}
#### Management token strings are not retrievable
The actual management token string is not printed and is only returned when
creating the token.
#### Revoked tokens are included in output
Revoked tokens still appear when listing management tokens, but they are no
longer valid for any operations.
{{% /note %}}
### Output formats
The `influxctl management list` command supports two output formats: `table` and `json`.
By default, the command outputs the list of tokens formatted as a table.
For easier programmatic access to the command output, include `--format json`
with your command to format the token list as JSON.
#### Example output
{{< code-tabs-wrapper >}}
{{% code-tabs %}}
[table](#)
[json](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```sh
+--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+
| ID | DESCRIPTION | PREFIX | CREATED AT | EXPIRES AT | REVOKED AT |
+--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+
| 000x0000-000x-0000-X0x0-X0X00000x000 | Client1 token | M.V1.+5Jk | 2024-03-12T19:58:47Z | 1970-01-01T00:00:00Z | 2024-03-12T20:03:29Z |
| 000x000X-Xx0X-0000-0x0X-000xX000xx00 | Client2 token | M.V1.ynmf | 2024-03-12T20:04:42Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z |
| 00XXxXxx-000X-000X-x0Xx-00000xx00x00 | Client3 token | M.V1.Eij4 | 2024-03-12T20:05:59Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z |
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```json
[
{
"id": "000x0000-000x-0000-X0x0-X0X00000x000",
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"token_prefix": "M.V1.+5Jk",
"revoked_at": {
"seconds": 1710273809,
"nanos": 948178000
},
"created_at": {
"seconds": 1710273527,
"nanos": 622095000
},
"description": "Client1 token",
"created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000"
},
{
"id": "00XXxXxx-000X-000X-x0Xx-00000xx00x00",
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"token_prefix": "M.V1.ynmf",
"revoked_at": {
"seconds": 1710274107,
"nanos": 467542000
},
"created_at": {
"seconds": 1710273882,
"nanos": 819785000
},
"description": "Client2 token",
"created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000"
},
{
"id": "000x000X-Xx0X-0000-0x0X-000xX000xx00",
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"token_prefix": "M.V1.nAHw",
"expires_at": {
"seconds": 1719491696
},
"revoked_at": {
"seconds": 1710274650,
"nanos": 63389000
},
"created_at": {
"seconds": 1710274420,
"nanos": 436126000
},
"description": "Client3 token",
"created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000"
}
]
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}

View File

@ -0,0 +1,52 @@
---
title: Revoke a management token
description: >
Use the [`influxctl management revoke` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke/)
to revoke a management token and remove all access associated with the token.
Provide the ID of the management token you want to revoke.
menu:
influxdb_cloud_dedicated:
parent: Management tokens
weight: 203
related:
- /influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke/
list_code_example: |
```sh
influxctl management revoke <TOKEN_ID>
```
---
Use the [`influxctl management revoke` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke/)
to revoke a management token and remove all access associated with the token.
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl).
2. Run the [`influxctl management list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/list)
to output tokens with their IDs.
Copy the **ID** of the token you want to delete.
```sh
influxctl management list
```
3. Run the `influxctl management revoke` command and provide the following:
- _Optional_: `--force` flag to skip command confirmation
- Token ID to delete
4. Confirm that you want to delete the token.
{{% code-placeholders "TOKEN_ID" %}}
```sh
influxctl management revoke --force TOKEN_ID
```
{{% /code-placeholders %}}
Replace {{% code-placeholder-key %}}`TOKEN_ID`{{% /code-placeholder-key %}} with
the ID of the token you want to revoke.
{{% note %}}
#### Revoked tokens are included when listing management tokens
Revoked tokens still appear when listing management tokens, but they are no
longer valid for any operations.
{{% /note %}}

View File

@ -300,8 +300,8 @@ _If your project's virtual environment is already running, skip to step 3._
Replace the following:
- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with
read access to the **get-started** database
- **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read access to the **get-started** database
- **`ORG_ID`**: any non-empty string (InfluxDB ignores this parameter, but the client requires it)
5. Enter the `influx3 sql` command and your SQL query statement.
@ -446,8 +446,8 @@ _If your project's virtual environment is already running, skip to step 3._
2. Calls the `InfluxDBClient3()` constructor method with credentials to instantiate an InfluxDB `client` with the following credentials:
- **`host`**: {{% product-name omit=" Clustered" %}} cluster URL (without `https://` protocol or trailing slash)
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with
read access to the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
- **`database`**: the name of the {{% product-name %}} database to query
@ -610,7 +610,8 @@ _If your project's virtual environment is already running, skip to step 3._
- **`Host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`Database`**: The name of your {{% product-name %}} database
- **`Token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database.
- **`Token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permission on the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a deferred function to close the client after execution.
@ -721,7 +722,8 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j
with InfluxDB credentials.
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the database you want to query.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permission on the database you want to query.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. Defines a string variable (`sql`) for the SQL query.
@ -846,7 +848,8 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL.
- **`database`**: the name of the {{% product-name %}} database to query
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permission on the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a string variable for the SQL query.
3. Calls the `InfluxDBClient.Query()` method to send the query request with the SQL string.
@ -974,7 +977,8 @@ _This tutorial assumes using Maven version 3.9, Java version >= 15, and an `infl
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`database`**: the name of the {{% product-name %}} database to write to
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permission on the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a string variable (`sql`) for the SQL query.
3. Defines a Markdown table format layout for headings and data rows.

View File

@ -431,7 +431,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-token)
with sufficient permissions to the specified database
If successful, the output is an HTTP `204 No Content` status code.
@ -513,7 +515,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
If successful, the output is an HTTP `204 No Content` status code.
@ -639,7 +643,8 @@ dependencies to your current project.
- **`host`**: {{% product-name omit=" Clustered" %}} cluster hostname (URL without protocol or trailing slash)
- **`org`**: an empty or arbitrary string (InfluxDB ignores this parameter)
- **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with write access to the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with write access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
- **`database`**: the name of the {{% product-name %}} database to write to
@ -795,7 +800,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu
1. To instantiate the client, calls the `influxdb3.New(influxdb3.ClientConfig)` function and passes the following:
- **`Host`**: the {{% product-name omit=" Clustered" %}} cluster URL
- **`Database`**: The name of your {{% product-name %}} database
- **`Token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- **`Token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
- **`WriteOptions`**: `influxdb3.WriteOptions` options for writing to InfluxDB.
@ -958,7 +964,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu
with InfluxDB credentials.
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. Defines a list of line protocol strings where each string represents a data record.
@ -1123,7 +1130,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`database`**: the name of the {{% product-name %}} database to write to
- **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
_Instantiating the client with the `using` statement ensures that the client is disposed of when it's no longer needed._
@ -1321,7 +1329,8 @@ _The tutorial assumes using Maven version 3.9 and Java version >= 15._
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`database`**: the name of the {{% product-name %}} database to write to
- **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a list of line protocol strings where each string represents a data record.

View File

@ -63,7 +63,7 @@ Learn how to authenticate requests, adjust request parameters for existing v1 wo
## Authenticate API requests
{{% product-name %}} requires each API request to be authenticated with a
[database token](/influxdb/cloud-dedicated/admin/tokens/).
[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens).
With the InfluxDB v1 API, you can use database tokens in InfluxDB 1.x username and password
schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Authorization: Bearer` scheme.
@ -73,8 +73,9 @@ schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Auth
### Authenticate with a username and password scheme
With the InfluxDB v1 API, you can use the InfluxDB 1.x convention of
username and password to authenticate database reads and writes by passing a [database token](/influxdb/cloud-dedicated/admin/tokens/) as the `password` credential.
When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/).
username and password to authenticate database reads and writes by passing a
[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) as the `password` credential.
When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens).
{{% product-name %}} ignores the `username` (`u`) parameter in the request.
Use one of the following authentication schemes with clients that support Basic authentication or query parameters (that don't support [token authentication](#authenticate-with-a-token)):
@ -85,7 +86,7 @@ Use one of the following authentication schemes with clients that support Basic
#### Basic authentication
Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests.
When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/).
When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens).
{{% product-name %}} ignores the `username` part of the decoded credential.
##### Syntax
@ -100,7 +101,8 @@ Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and the
##### Example
The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/cloud-dedicated/admin/tokens/):
The following example shows how to use cURL with the `Basic` authentication
scheme and a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens):
{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}}
```sh
@ -111,7 +113,9 @@ The following example shows how to use cURL with the `Basic` authentication sche
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
#### Query string authentication
@ -127,7 +131,8 @@ https://{{< influxdb/host >}}/write/?[u=any]&p=DATABASE_TOKEN
##### Example
The following example shows how to use cURL with query string authentication and [database token](/influxdb/cloud-dedicated/admin/tokens/).
The following example shows how to use cURL with query string authentication and
[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens).
{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}}
```sh
@ -138,12 +143,15 @@ The following example shows how to use cURL with query string authentication and
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
### Authenticate with a token scheme
Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/cloud-dedicated/admin/tokens/) for authenticating
v1 API `/write` and `/query` requests.
Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a
[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) for
authenticating v1 API `/write` and `/query` requests.
`Bearer` and `Token` are equivalent in {{% product-name %}}.
The `Token` scheme is used in the InfluxDB 2.x API.
@ -181,7 +189,9 @@ Use `Token` to authenticate a write request:
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with
sufficient permissions to the specified database
## Responses
@ -283,7 +293,7 @@ Parameter | Ignored | Value
`database` | Honored | Database name
`retention_policy` | Honored, but discouraged | [Duration](/influxdb/cloud-dedicated/reference/glossary/#duration)
`username` | Ignored | String or empty
`password` | Honored | [Database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database
`password` | Honored | [Database token](/influxdb/cloud-dedicated/administration/tokens/#database-tokens) with permission to write to the database
`content_encoding` | Honored | `gzip` (compressed data) or `identity` (uncompressed)
`skip_database_creation` | Ignored | N/A (see how to [create a database](/influxdb/cloud-dedicated/admin/databases/create/))
@ -305,7 +315,9 @@ To configure the v1.x output plugin for writing to {{% product-name %}}, add the
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
##### Other Telegraf configuration options
@ -321,7 +333,8 @@ Include the following in your request:
- A `db` query string parameter with the name of the database to write to.
- A request body that contains a string of data in [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) syntax.
- A [database token](/influxdb/cloud-dedicated/admin/tokens/) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token).
- A [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) in
one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token).
- Optional [parameters](#v1-api-write-parameters).
The following example shows how to use the **cURL** command line tool and the {{% product-name %}} v1 API to write line protocol data to a database:
@ -340,7 +353,9 @@ curl -i 'https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s' \
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
##### v1 CLI (not supported)
@ -410,7 +425,9 @@ client = InfluxDBClient(
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
## Query data

View File

@ -51,11 +51,14 @@ For help finding the best workflow for your situation, [contact Support](mailto:
## Authenticate API requests
InfluxDB API endpoints require each request to be authenticated with a [database token](/influxdb/cloud-dedicated/admin/tokens/).
InfluxDB API endpoints require each request to be authenticated with a
[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens).
### Authenticate with a token
Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to pass a [database token](/influxdb/cloud-dedicated/admin/tokens/) that has the necessary permissions for the operation.
Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to
pass a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
that has the necessary permissions for the operation.
`Bearer` and `Token` are equivalent in InfluxDB Cloud Dedicated.
The `Token` scheme is used in the InfluxDB 2.x API.
@ -93,7 +96,9 @@ Use `Token` to authenticate a write request:
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
## Responses

View File

@ -337,8 +337,8 @@ You would create the following InfluxDB {{< current-version >}} databases:
3. **Create a database token for writing to your InfluxDB Cloud Dedicated database.**
Use the [`influxctl token create` command](/influxdb/cloud-dedicated/admin/tokens/create/)
to [create a database token](/influxdb/cloud-dedicated/admin/tokens/create/) with
Use the [`influxctl token create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/)
to [create a database token](/influxdb/cloud-dedicated/admin/tokens/database/create/) with
_write_ permission to your database.
Provide the following:

View File

@ -169,7 +169,7 @@ to complete the migration.
1. [Create a database](/influxdb/cloud-dedicated/admin/databases/create/)
**to migrate data to**.
2. [Create a token](/influxdb/cloud-dedicated/admin/tokens/create/)
2. [Create a database token](/influxdb/cloud-dedicated/admin/tokens/database/create/)
with **write access** to the database you want to migrate to.
2. **In the InfluxDB Cloud (TSM) organization you're migrating data _from_**:

View File

@ -71,7 +71,7 @@ instantiate two InfluxDB clients:
Provide the following credentials for each client:
- **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_
- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/)
- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read and write permissions on the databases you want to query and write to.
- **database**: InfluxDB database name

View File

@ -67,7 +67,7 @@ Provide the following credentials:
- **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_
- **org**: InfluxDB organization name
- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/)
- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
read permissions on the database you want to query
- **database**: InfluxDB database name

View File

@ -105,7 +105,9 @@ print(dataframe)
2. Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ permission on the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _read_ permission on the specified database
3. In your terminal, use the Python interpreter to run the file:
@ -211,7 +213,9 @@ print(dataframe.to_markdown())
Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
An InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permission on the specified database.
### Downsample time series

View File

@ -95,7 +95,9 @@ print(querySQL())
2. Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the databases you want to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
An InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the databases you want to query.
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query.
3. In your terminal, use the Python interpreter to run the file:
@ -153,8 +155,11 @@ print(table.group_by('room').aggregate([('temp', 'mean')]))
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the databases you want to query.
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/tokens/) to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
An InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the databases you want to query.
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query.
{{< expand-wrapper >}}
{{% expand "View example results" %}}

View File

@ -38,7 +38,7 @@ If you haven't already, [download and install Chronograf](/chronograf/v1/introdu
- **Connection Name:** Name to uniquely identify this connection configuration
- **Username:** Arbitrary string _(ignored, but cannot be empty)_
- **Password:** InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/)
- **Password:** InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the database you want to query
- **Telegraf Database Name:** InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/)
Chronograf uses to populate parts of the application, including the Host List page (default is `telegraf`)

View File

@ -92,7 +92,7 @@ When creating an InfluxDB data source that uses SQL to query data:
2. Under **InfluxDB Details**:
- **Database**: Provide a default database name to query.
- **Token**: Provide an [API token](/influxdb/cloud-dedicated/admin/tokens/)
- **Token**: Provide a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read access to the databases you want to query.
3. Click **Save & test**.
@ -120,7 +120,7 @@ When creating an InfluxDB data source that uses InfluxQL to query data:
- **Database**: Provide a default database name to query.
- **User**: Provide an arbitrary string.
_This credential is ignored when querying {{% product-name %}}, but it cannot be empty._
- **Password**: Provide an [API token](/influxdb/cloud-dedicated/admin/tokens/)
- **Password**: Provide a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read access to the databases you want to query.
- **HTTP Method**: Choose one of the available HTTP request methods to use when querying data:

View File

@ -85,9 +85,9 @@ Setting `useSystemTrustStore=false` is only necessary on macOS and doesn't actua
_See an [example connection URL](#example-connection-url)._
- **Dialect**: PostreSQL
- **Dialect**: PostgreSQL
- **Username**: _Leave empty_
- **Password**: [Database token](/influxdb/cloud-dedicated/admin/tokens/)
- **Password**: [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read access to the specified database
- **Properties File**: _Leave empty_

View File

@ -111,7 +111,9 @@ In your `influxdb_go_client` module directory, create a file named `query.go` an
Replace the following configuration values in the sample code:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ permission on the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _read_ permission on the specified database
{{% tabs-wrapper %}}
{{% tabs %}}

View File

@ -67,7 +67,7 @@ Execute queries and retrieve data over the Flight+gRPC protocol, and then proces
This guide assumes the following prerequisites:
- an {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/) with data to query
- a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the database
- a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _read_ access to the database
To learn how to set up InfluxDB and write data, see the [Setup instructions](/influxdb/cloud-dedicated/get-started/setup/) in the Get Started tutorial.
@ -290,7 +290,8 @@ For more information, see [`influxdb_client_3` query exceptions](/influxdb/cloud
Replace the following configuration values:
- **`database`**: the name of the [{{% product-name %}} database](/influxdb/cloud-dedicated/admin/databases/) to query
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _read_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
### Execute a query
@ -408,7 +409,8 @@ print(table.group_by('room').aggregate([('temp', 'mean')]))
Replace the following configuration values:
- **`database`**: the name of the [{{% product-name %}} database](/influxdb/cloud-dedicated/admin/databases/) to query
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database.
- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _read_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
Next, learn how to use Python tools to work with time series data:

View File

@ -33,7 +33,7 @@ The `influxctl query` command only supports SQL queries; not InfluxQL.
Provide the following with your command:
- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/)
- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the queried database. Uses the `token` setting from
the [`influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles)
or the `--token` command flag.

View File

@ -67,7 +67,8 @@ Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database.
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _read_ access to the specified database.
{{% note %}}
#### Authenticate with username and password
@ -76,7 +77,8 @@ If using basic authentication or query string authentication (username and passw
to interact with the v1 HTTP query API, provide the following credentials:
- **username**: an arbitrary string _({{< product-name >}} ignores the username)_
- **password**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database.
- **password**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _read_ access to the specified database.
{{< code-tabs-wrapper >}}
{{% code-tabs %}}

View File

@ -92,7 +92,9 @@ assert 'logical_plan' in df.plan_type.values, "Expect logical_plan"
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /expand %}}
{{% /expand-wrapper %}}

View File

@ -231,7 +231,9 @@ use_middleware_trace_header()
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% note %}}
Store or log your query trace ID to ensure you can provide it to InfluxData Support for troubleshooting.

View File

@ -7,6 +7,8 @@ menu:
influxdb_cloud_dedicated:
parent: influxctl
weight: 201
related:
- /influxdb/cloud-dedicated/admin/tokens/management/
---
The `influxctl management` command and its subcommands manage management tokens

View File

@ -7,6 +7,8 @@ menu:
influxdb_cloud_dedicated:
parent: influxctl management
weight: 301
related:
- /influxdb/cloud-dedicated/admin/tokens/management/create/
---
The `influxctl management create` command creates a management token to be used

View File

@ -7,6 +7,8 @@ menu:
influxdb_cloud_dedicated:
parent: influxctl management
weight: 301
related:
- /influxdb/cloud-dedicated/admin/tokens/management/list/
---
The `influxctl management list` command lists all management tokens used to

View File

@ -7,6 +7,8 @@ menu:
influxdb_cloud_dedicated:
parent: influxctl management
weight: 301
related:
- /influxdb/cloud-dedicated/admin/tokens/management/revoke/
---
The `influxctl management revoke` command revokes management token access

View File

@ -151,6 +151,8 @@ print(data_frame.to_markdown())
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /code-tabs-wrapper %}}

View File

@ -94,7 +94,9 @@ client = FlightSQLClient(host='{{< influxdb/host >}}',
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the databases you want to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an
{{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the databases you want to query
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
### Instance methods

View File

@ -57,7 +57,7 @@ Use the Go library to write and query data from InfluxDB.
)
```
2. Define variables for your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) (bucket), organization (required, but ignored), and [token](/influxdb/cloud-dedicated/admin/tokens/).
2. Define variables for your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) (bucket), organization (required, but ignored), and [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens).
```go
bucket := "DATABASE_NAME"

View File

@ -82,7 +82,7 @@ It only works with InfluxDB v2 management APIs.
The client examples include an [`env`](https://github.com/influxdata/influxdb-client-js/blob/master/examples/env.js) module for accessing your InfluxDB properties from environment variables or from `env.js`.
The examples use these properties to interact with the InfluxDB API.
Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), [token](/influxdb/cloud-dedicated/admin/tokens/), and cluster URL.
Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens), and cluster URL.
```sh
export INFLUX_URL=https://{{< influxdb/host >}}

View File

@ -48,7 +48,8 @@ You'll need the following prerequisites:
https://{{< influxdb/host >}}
```
3. Name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write to.
4. InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database.
4. InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with permission to write to the database.
_For security reasons, we recommend setting an environment variable to store your token and avoid exposing the raw token value in your script._
## Write data to InfluxDB with Python
@ -64,7 +65,7 @@ Follow the steps to write [line protocol](/influxdb/cloud-dedicated/reference/sy
import os
```
3. Define variables for your [database name](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), and [token](/influxdb/cloud-dedicated/admin/tokens/).
3. Define variables for your [database name](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), and [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens).
```python
database = "DATABASE_NAME"

View File

@ -102,7 +102,9 @@ func main() {
Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ permission on the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _read_ permission on the specified database
## Class influxdb3.Client

View File

@ -222,7 +222,9 @@ client = InfluxDBClient3(token="DATABASE_TOKEN",
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the specified database
##### Initialize a client for batch writing
@ -270,7 +272,9 @@ invokes the callback function, if specified, for the response status (success, e
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with read permissions on the specified database
### InfluxDBClient3 instance methods

View File

@ -156,7 +156,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Cloud Dedicated database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/)
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ permission to the database
{{% /expand %}}
@ -263,7 +263,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Cloud Dedicated database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/)
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ permission to the database
{{% /expand %}}
@ -342,7 +342,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Cloud Dedicated database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/)
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /expand %}}
@ -425,7 +425,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Cloud Dedicated database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/)
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /expand %}}
@ -496,7 +496,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Cloud Dedicated database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/)
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /expand %}}

View File

@ -136,7 +136,9 @@ curl --request POST "https://{{< influxdb/host >}}/api/v2/write?org=ignored&buck
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
{{% /tab-content %}}
@ -201,7 +203,7 @@ EOF
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [databse token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. To test the input and processor, enter the following command:
@ -297,7 +299,7 @@ curl -s "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precisi
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. To test the input and processor, enter the following command:
@ -385,7 +387,7 @@ The following example creates sample data for two series (the combination of mea
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. To test the input and aggregator, enter the following command:
@ -474,7 +476,7 @@ The following example shows how to use Telegraf to remove points that repeat fie
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. To test the input and processor, enter the following command:
@ -699,7 +701,7 @@ The Go `multiplier.go` sample code does the following:
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
5. To test the input and processor, enter the following command:

View File

@ -52,7 +52,7 @@ After setting up InfluxDB and your project, you should have the following:
- {{< product-name >}} credentials:
- [Database](/influxdb/cloud-dedicated/admin/databases/)
- [Token](/influxdb/cloud-dedicated/admin/tokens/)
- [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
- Cluster hostname
- A directory for your project.

View File

@ -67,8 +67,8 @@ to write the [home sensor sample data](#home-sensor-data-line-protocol) to your
Provide the following:
- Database name using the `--database` flag
- [Database token](/influxdb/cloud-dedicated/admin/tokens/) (with write permissions
on the target database) using the `--token` flag
- [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
(with write permissions on the target database) using the `--token` flag
- Timestamp precision as seconds (`s`) using the `--precision` flag
- [Line protocol](#construct-line-protocol).
Pass the line protocol in one of the following ways:

View File

@ -100,9 +100,12 @@ To write to {{% product-name %}}, include your {{% product-name omit=" Clustered
##### `token`
Your {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ permission to the database.
Your {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens)
with _write_ permission to the database.
In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/cloud-dedicated/admin/tokens/) that has _write_ permission to the database.
In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a
[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) that
has _write_ permission to the database.
##### `organization`

View File

@ -11,8 +11,8 @@ aliases:
- /influxdb/cloud/security/tokens/create-token/
alt_links:
cloud-serverless: /influxdb/cloud-serverless/admin/tokens/create-token
cloud-dedicated: /influxdb/cloud-dedicated/admin/tokens/create
clustered: /influxdb/clustered/admin/tokens/create
cloud-dedicated: /influxdb/cloud-dedicated/admin/tokens/database/create
clustered: /influxdb/clustered/admin/tokens/database/create
---
{{< duplicate-oss >}}

View File

@ -56,7 +56,7 @@ The `influxctl query` command only supports SQL queries; not InfluxQL.
Provide the following with your command:
- **Database token**: [Database token](/influxdb/clustered/admin/tokens/)
- **Database token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read permissions on the queried database. Uses the `token` setting from
the [`influxctl` connection profile](/influxdb/clustered/reference/cli/influxctl/#configure-connection-profiles)
or the `--token` command flag.

View File

@ -12,14 +12,27 @@ weight: 101
influxdb/clustered/tags: [tokens]
---
InfluxDB uses token authentication to authorize access to data in your InfluxDB
cluster. Each token grants read and write permissions to one or
more databases and allows for actions like writing and querying data.
InfluxDB uses token authentication to authorize access to data in your
{{< product-name omit=" Clustered" >}} cluster.
There are two types of tokens:
All read and write actions performed against time series data in your InfluxDB
cluster must be authorized using a token. Administrative actions
such as managing tokens and databases are authorized using **management tokens**
issued by **Auth0**. Management tokens allow clients, such as the `influxctl` CLI,
- [Database tokens](#database-tokens)
- [Management tokens](#management-tokens)
#### Database tokens
Database tokens grant read and write permissions to one or more databases
and allows for actions like writing and querying data.
All read and write actions performed against time series data in your
{{< product-name omit=" Clustered" >}} cluster must be authorized using a token.
#### Management tokens
Management tokens grant permission to perform administrative actions such as
managing users, databases, and database tokens.
Management tokens allow clients, such as the
[`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/),
to perform administrative actions.
{{% note %}}

View File

@ -0,0 +1,19 @@
---
title: Manage database tokens
seotitle: Manage database tokens in InfluxDB Clustered
description: >
Manage database tokens in your InfluxDB cluster.
Database tokens grant read and write permissions to one or more databases and
allow for actions like writing and querying data.
menu:
influxdb_clustered:
parent: Manage tokens
name: Database tokens
weight: 101
influxdb/clustered/tags: [tokens]
---
{{< product-name >}} database tokens grant read and write permissions to one or
more databases and allow for actions like writing and querying data.
{{< children >}}

View File

@ -1,12 +1,12 @@
---
title: Create a token
title: Create a database token
description: >
Use the [`influxctl token create` command](/influxdb/clustered/reference/cli/influxctl/token/create/)
to create a database token for reading and writing data in your InfluxDB cluster.
Provide a token description and permissions for databases.
menu:
influxdb_clustered:
parent: Manage tokens
parent: Database tokens
weight: 201
list_code_example: |
```sh
@ -16,6 +16,8 @@ list_code_example: |
--write-database DATABASE2_NAME \
"Read-only on DATABASE1_NAME, Read/write on DATABASE2_NAME"
```
aliases:
- /influxdb/clustered/admin/tokens/create/
alt_links:
cloud: /influxdb/cloud/admin/tokens/create-token/
cloud-serverless: /influxdb/cloud-serverless/admin/tokens/create-token/

View File

@ -1,5 +1,5 @@
---
title: Delete a token
title: Delete a database token
description: >
Use the [`influxctl token delete` command](/influxdb/clustered/reference/cli/influxctl/token/delete/)
to delete a token from your InfluxDB cluster and revoke all
@ -7,12 +7,14 @@ description: >
Provide the ID of the token you want to delete.
menu:
influxdb_clustered:
parent: Manage tokens
parent: Database tokens
weight: 203
list_code_example: |
```sh
influxctl token delete <TOKEN_ID>
```
aliases:
- /influxdb/clustered/admin/tokens/delete/
---
Use the [`influxctl token delete` command](/influxdb/clustered/reference/cli/influxctl/token/delete/)

View File

@ -1,16 +1,18 @@
---
title: List tokens
title: List database tokens
description: >
Use the [`influxctl token list` command](/influxdb/clustered/reference/cli/influxctl/token/list/)
to list tokens in your InfluxDB cluster.
menu:
influxdb_clustered:
parent: Manage tokens
parent: Manage database tokens
weight: 202
list_code_example: |
```sh
influxctl token list
```
aliases:
- /influxdb/clustered/admin/tokens/list/
---
Use the [`influxctl token list` command](/influxdb/clustered/reference/cli/influxctl/token/list/)

View File

@ -1,11 +1,11 @@
---
title: Update a token
title: Update a database token
description: >
Use the [`influxctl token update` command](/influxdb/clustered/reference/cli/influxctl/token/update/)
to update a database token's permissions in your InfluxDB cluster.
menu:
influxdb_clustered:
parent: Manage tokens
parent: Manage database tokens
weight: 201
list_code_example: |
```sh
@ -15,6 +15,8 @@ list_code_example: |
--write-database <DATABASE2_NAME> \
<TOKEN_ID>
```
aliases:
- /influxdb/clustered/admin/tokens/update/
alt_links:
cloud-serverless: /influxdb/cloud-serverless/admin/tokens/update-tokens/
---

View File

@ -0,0 +1,78 @@
---
title: Manage management tokens
seotitle: Manage management tokens in InfluxDB Clustered
description: >
Manage management tokens in your InfluxDB cluster.
Management tokens grant permission to perform administrative actions such as
managing users, databases, and database tokens.
menu:
influxdb_clustered:
parent: Manage tokens
name: Management tokens
weight: 101
influxdb/clustered/tags: [tokens]
---
Management tokens grant permission to perform administrative actions such as
managing users, databases, and database tokens in your
{{< product-name omit=" Clustered">}} cluster.
{{% note %}}
Management tokens do _not_ grant permissions to write or query time series data
in your {{< product-name omit=" Clustered">}} cluster.
To grant write or query permissions, use management tokens to create [database tokens](/influxdb/clustered/admin/tokens/database/).
{{% /note %}}
By default, management tokens are short-lived tokens issued by an OAuth
provider that grant a specific user administrative access to your
{{< product-name omit=" Clustered">}} cluster.
However, for automation purposes, you can manually create management tokens that
authenticate directly with your InfluxDB Cluster and do not require human
interaction with your OAuth provider.
{{% warn %}}
#### For automation use cases only
The tools outlined below are meant for automation use cases and should not be
used to circumvent your OAuth provider. **Take great care when manually creating
and using management tokens**.
{{< product-name >}} requires at least one user associated with your cluster
and authorized through OAuth to manually create a management token.
{{% /warn %}}
{{< children type="anchored-list" >}}
- [Use a management token](#use-a-management-token)
{{< children readmore=true hlevel="h2" hr=true >}}
---
## Use a management token
Use management tokens to automate authorization for the
[`influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/):
1. [Create a management token](#create-a-management-token) and securely store the output token value. You'll use it in the next step.
2. On the machine where the `influxctl` CLI is to be automated, update your
[`influxctl` connection profile](/influxdb/clustered/reference/cli/influxctl/#configure-connection-profiles)
by assigning the `mgmt_token` setting to the token string from the preceding step.
{{% code-placeholders "(INFLUXDB|MANAGEMENT)_(PORT|TOKEN)" %}}
```toml
[[profile]]
name = "default"
product = "clustered"
host = "{{< influxdb/host >}}"
port = "INFLUXDB_PORT"
mgmt_token = "MANAGEMENT_TOKEN"
```
{{% /code-placeholders %}}
Replace the following:
- {{% code-placeholder-key %}}`INFLUXDB_PORT`{{% /code-placeholder-key %}}:
{{< product-name >}} InfluxDB cluster port
- {{% code-placeholder-key %}}`MANAGEMENT_TOKEN`{{% /code-placeholder-key %}}:
Management token string

View File

@ -0,0 +1,73 @@
---
title: Create a management token
description: >
Use the [`influxctl management create` command](/influxdb/clustered/reference/cli/influxctl/management/create)
to manually create a management token.
menu:
influxdb_clustered:
parent: Management tokens
weight: 201
influxdb/clustered/tags: [tokens]
related:
- /influxdb/clustered/admin/tokens/management/#use-a-management-token, Use a management token
- /influxdb/clustered/reference/cli/influxctl/management/create/
list_code_example: |
```sh
influxctl management create \
--expires-at $(date -v+1d -Iseconds) \
--description "Example token description"
```
---
By default, management tokens are short-lived tokens issued by an OAuth
provider that grant a specific user administrative access to your
{{< product-name omit=" Clustered">}} cluster.
However, for automation purposes, you can manually create management tokens that
authenticate directly with your InfluxDB cluster and do not require human
interaction with your OAuth provider.
{{% warn %}}
#### For automation use cases only
The tools outlined below are meant for automation use cases and should not be
used to circumvent your OAuth provider. **Take great care when manually creating
and using management tokens**.
{{< product-name >}} requires at least one user associated with your cluster
and authorized through OAuth to manually create a management token.
{{% /warn %}}
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/#download-and-install-influxctl).
2. Use the [`influxctl management create` command](/influxdb/clustered/reference/cli/influxctl/management/create/)
to manually create a management token. Provide the following:
- _Optional_: the `--expires-at` flag with an RFC3339 date string that defines the
token expiration date and time--for example, `{{< datetime/current-date offset=1 >}}`.
If expiration isn't set, the token does not expire until revoked.
- _Optional_: the `--description` flag with a description for the management token.
{{% code-placeholders "RFC3339_EXPIRATION|TOKEN_DESCRIPTION" %}}
```sh
influxctl management create \
--expire-at RFC3339_EXPIRATION \
--description TOKEN_DESCRIPTION
```
{{% /code-placeholders %}}
Replace the following:
- {{% code-placeholder-key %}}`RFC3339_EXPIRATION`{{% /code-placeholder-key %}}:
An RFC3339 date string to expire the token at--for example,
`{{< datetime/current-date offset=1 >}}`.
- {{% code-placeholder-key %}}`TOKEN_DESCRIPTION`{{% /code-placeholder-key %}}:
Management token description.
The output contains the management token string.
{{% note %}}
#### Store secure tokens in a secret store
Management token strings are returned _only_ on token creation.
We recommend storing database tokens in a **secure secret store**.
For example, see how to [authenticate Telegraf using tokens in your OS secret store](https://github.com/influxdata/telegraf/tree/master/plugins/secretstores/os).
{{% /note %}}

View File

@ -0,0 +1,126 @@
---
title: List management tokens
description: >
Use the [`influxctl management list` command](/influxdb/clustered/reference/cli/influxctl/management/list/)
to list manually-created management tokens.
menu:
influxdb_clustered:
parent: Management tokens
weight: 201
influxdb/clustered/tags: [tokens]
related:
- /influxdb/clustered/admin/tokens/management/#use-a-management-token, Use a management token
- /influxdb/clustered/reference/cli/influxctl/management/list/
list_code_example: |
```sh
influxctl management list --format json
```
---
Use the [`influxctl management list` command](/influxdb/clustered/reference/cli/influxctl/management/list)
to list manually-created management tokens.
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/#download-and-install-influxctl).
2. Run `influxctl management list` with the following:
- _Optional_: [Output format](#output-formats)
```sh
influxctl management list --format json
```
{{% note %}}
#### Management token strings are not retrievable
The actual management token string is not printed and is only returned when
creating the token.
#### Revoked tokens are included in output
Revoked tokens still appear when listing management tokens, but they are no
longer valid for any operations.
{{% /note %}}
### Output formats
The `influxctl management list` command supports two output formats: `table` and `json`.
By default, the command outputs the list of tokens formatted as a table.
For easier programmatic access to the command output, include `--format json`
with your command to format the token list as JSON.
#### Example output
{{< code-tabs-wrapper >}}
{{% code-tabs %}}
[table](#)
[json](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```sh
+--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+
| ID | DESCRIPTION | PREFIX | CREATED AT | EXPIRES AT | REVOKED AT |
+--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+
| 000x0000-000x-0000-X0x0-X0X00000x000 | Client1 token | M.V1.+5Jk | 2024-03-12T19:58:47Z | 1970-01-01T00:00:00Z | 2024-03-12T20:03:29Z |
| 000x000X-Xx0X-0000-0x0X-000xX000xx00 | Client2 token | M.V1.ynmf | 2024-03-12T20:04:42Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z |
| 00XXxXxx-000X-000X-x0Xx-00000xx00x00 | Client3 token | M.V1.Eij4 | 2024-03-12T20:05:59Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z |
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
```json
[
{
"id": "000x0000-000x-0000-X0x0-X0X00000x000",
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"token_prefix": "M.V1.+5Jk",
"revoked_at": {
"seconds": 1710273809,
"nanos": 948178000
},
"created_at": {
"seconds": 1710273527,
"nanos": 622095000
},
"description": "Client1 token",
"created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000"
},
{
"id": "00XXxXxx-000X-000X-x0Xx-00000xx00x00",
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"token_prefix": "M.V1.ynmf",
"revoked_at": {
"seconds": 1710274107,
"nanos": 467542000
},
"created_at": {
"seconds": 1710273882,
"nanos": 819785000
},
"description": "Client2 token",
"created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000"
},
{
"id": "000x000X-Xx0X-0000-0x0X-000xX000xx00",
"account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X",
"token_prefix": "M.V1.nAHw",
"expires_at": {
"seconds": 1719491696
},
"revoked_at": {
"seconds": 1710274650,
"nanos": 63389000
},
"created_at": {
"seconds": 1710274420,
"nanos": 436126000
},
"description": "Client3 token",
"created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000"
}
]
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}

View File

@ -0,0 +1,52 @@
---
title: Revoke a management token
description: >
Use the [`influxctl management revoke` command](/influxdb/clustered/reference/cli/influxctl/management/revoke/)
to revoke a management token and remove all access associated with the token.
Provide the ID of the management token you want to revoke.
menu:
influxdb_clustered:
parent: Management tokens
weight: 203
related:
- /influxdb/clustered/reference/cli/influxctl/management/revoke/
list_code_example: |
```sh
influxctl management revoke <TOKEN_ID>
```
---
Use the [`influxctl management revoke` command](/influxdb/clustered/reference/cli/influxctl/management/revoke/)
to revoke a management token and remove all access associated with the token.
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/#download-and-install-influxctl).
2. Run the [`influxctl management list` command](/influxdb/clustered/reference/cli/influxctl/management/list)
to output tokens with their IDs.
Copy the **ID** of the token you want to delete.
```sh
influxctl management list
```
3. Run the `influxctl management revoke` command and provide the following:
- _Optional_: `--force` flag to skip command confirmation
- Token ID to delete
4. Confirm that you want to delete the token.
{{% code-placeholders "TOKEN_ID" %}}
```sh
influxctl management revoke --force TOKEN_ID
```
{{% /code-placeholders %}}
Replace {{% code-placeholder-key %}}`TOKEN_ID`{{% /code-placeholder-key %}} with
the ID of the token you want to revoke.
{{% note %}}
#### Revoked tokens are included when listing management tokens
Revoked tokens still appear when listing management tokens, but they are no
longer valid for any operations.
{{% /note %}}

View File

@ -300,7 +300,7 @@ _If your project's virtual environment is already running, skip to step 3._
Replace the following:
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/) with
- **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
read access to the **get-started** database
- **`ORG_ID`**: any non-empty string (InfluxDB ignores this parameter, but the client requires it)
@ -446,7 +446,7 @@ _If your project's virtual environment is already running, skip to step 3._
2. Calls the `InfluxDBClient3()` constructor method with credentials to instantiate an InfluxDB `client` with the following credentials:
- **`host`**: {{% product-name omit=" Clustered" %}} cluster URL (without `https://` protocol or trailing slash)
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
read access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
- **`database`**: the name of the {{% product-name %}} database to query
@ -609,8 +609,8 @@ _If your project's virtual environment is already running, skip to step 3._
1. Instantiates `influx.Client` with InfluxDB credentials.
- **`Host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`Database`**: The name of your {{% product-name %}} database
- **`Token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the specified database.
- **`Database`**: the name of your {{% product-name %}} database
- **`Token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a deferred function to close the client after execution.
@ -721,7 +721,7 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j
with InfluxDB credentials.
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the database you want to query.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the database you want to query.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. Defines a string variable (`sql`) for the SQL query.
@ -846,7 +846,7 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL.
- **`database`**: the name of the {{% product-name %}} database to query
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a string variable for the SQL query.
3. Calls the `InfluxDBClient.Query()` method to send the query request with the SQL string.
@ -974,7 +974,7 @@ _This tutorial assumes using Maven version 3.9, Java version >= 15, and an `infl
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`database`**: the name of the {{% product-name %}} database to write to
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a string variable (`sql`) for the SQL query.
3. Defines a Markdown table format layout for headings and data rows.

View File

@ -431,7 +431,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
sufficient permissions to the specified database
If successful, the output is an HTTP `204 No Content` status code.
@ -513,7 +515,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
sufficient permissions to the specified database
If successful, the output is an HTTP `204 No Content` status code.
@ -639,7 +643,8 @@ dependencies to your current project.
- **`host`**: {{% product-name omit=" Clustered" %}} cluster hostname (URL without protocol or trailing slash)
- **`org`**: an empty or arbitrary string (InfluxDB ignores this parameter)
- **`token`**: a [token](/influxdb/clustered/admin/tokens/) with write access to the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with write access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
- **`database`**: the name of the {{% product-name %}} database to write to
@ -795,7 +800,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu
1. To instantiate the client, calls the `influxdb3.New(influxdb3.ClientConfig)` function and passes the following:
- **`Host`**: the {{% product-name omit=" Clustered" %}} cluster URL
- **`Database`**: The name of your {{% product-name %}} database
- **`Token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- **`Token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
- **`WriteOptions`**: `influxdb3.WriteOptions` options for writing to InfluxDB.
@ -958,7 +964,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu
with InfluxDB credentials.
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. Defines a list of line protocol strings where each string represents a data record.
@ -1123,7 +1130,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`database`**: the name of the {{% product-name %}} database to write to
- **`token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
_Instantiating the client with the `using` statement ensures that the client is disposed of when it's no longer needed._
@ -1321,7 +1329,8 @@ _The tutorial assumes using Maven version 3.9 and Java version >= 15._
- **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL
- **`database`**: the name of the {{% product-name %}} database to write to
- **`token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with _write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. Defines a list of line protocol strings where each string represents a data record.

View File

@ -62,7 +62,7 @@ Learn how to authenticate requests, adjust request parameters for existing v1 wo
## Authenticate API requests
{{% product-name %}} requires each API request to be authenticated with a
[database token](/influxdb/clustered/admin/tokens/).
[database token](/influxdb/clustered/admin/tokens/#database-tokens).
With the InfluxDB v1 API, you can use database tokens in InfluxDB 1.x username and password
schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Authorization: Bearer` scheme.
@ -72,8 +72,8 @@ schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Auth
### Authenticate with a username and password scheme
With the InfluxDB v1 API, you can use the InfluxDB 1.x convention of
username and password to authenticate database reads and writes by passing a [database token](/influxdb/clustered/admin/tokens/) as the `password` credential.
When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/clustered/admin/tokens/).
username and password to authenticate database reads and writes by passing a [database token](/influxdb/clustered/admin/tokens/#database-tokens) as the `password` credential.
When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/clustered/admin/tokens/#database-tokens).
{{% product-name %}} ignores the `username` (`u`) parameter in the request.
Use one of the following authentication schemes with clients that support Basic authentication or query parameters (that don't support [token authentication](#authenticate-with-a-token)):
@ -84,7 +84,7 @@ Use one of the following authentication schemes with clients that support Basic
#### Basic authentication
Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests.
When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/).
When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/#database-tokens).
{{% product-name %}} ignores the `username` part of the decoded credential.
##### Syntax
@ -99,7 +99,7 @@ Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and the
##### Example
The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/):
The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/#database-tokens):
{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}}
```sh
@ -113,7 +113,7 @@ curl --get "https://{{< influxdb/host >}}/query" \
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
#### Query string authentication
@ -129,7 +129,7 @@ https://{{< influxdb/host >}}/write/?[u=any]&p=DATABASE_TOKEN
##### Example
The following example shows how to use cURL with query string authentication and [database token](/influxdb/clustered/admin/tokens/).
The following example shows how to use cURL with query string authentication and [database token](/influxdb/clustered/admin/tokens/#database-tokens).
{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}}
```sh
@ -143,11 +143,11 @@ curl --get "https://{{< influxdb/host >}}/query" \
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
### Authenticate with a token scheme
Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/) for authenticating
Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/#database-tokens) for authenticating
v1 API `/write` and `/query` requests.
`Bearer` and `Token` are equivalent in {{% product-name %}}.
@ -196,7 +196,7 @@ curl -i "https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s" \
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
## Responses
@ -299,7 +299,7 @@ Parameter | Ignored | Value
`database` | Honored | Database name
`retention_policy` | Honored, but discouraged | [Duration](/influxdb/clustered/reference/glossary/#duration)
`username` | Ignored | String or empty
`password` | Honored | [Database token](/influxdb/clustered/admin/tokens/) with permission to write to the database
`password` | Honored | [database token](/influxdb/clustered/admin/tokens/#database-tokens) with permission to write to the database
`content_encoding` | Honored | `gzip` (compressed data) or `identity` (uncompressed)
`skip_database_creation` | Ignored | N/A (see how to [create a database](/influxdb/clustered/admin/databases/create/))
@ -321,7 +321,7 @@ To configure the v1.x output plugin for writing to {{% product-name %}}, add the
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
##### Other Telegraf configuration options
@ -337,7 +337,7 @@ Include the following in your request:
- A `db` query string parameter with the name of the database to write to.
- A request body that contains a string of data in [line protocol](/influxdb/clustered/reference/syntax/line-protocol/) syntax.
- A [database token](/influxdb/clustered/admin/tokens/) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token).
- A [database token](/influxdb/clustered/admin/tokens/#database-tokens) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token).
- Optional [parameters](#v1-api-write-parameters).
The following example shows how to use the **cURL** command line tool and the {{% product-name %}} v1 API to write line protocol data to a database:
@ -356,7 +356,7 @@ curl -i 'https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s' \
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
##### v1 CLI (not supported)
@ -426,7 +426,7 @@ client = InfluxDBClient(
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
## Query data

View File

@ -50,11 +50,11 @@ For help finding the best workflow for your situation, [contact Support](mailto:
## Authenticate API requests
InfluxDB API endpoints require each request to be authenticated with a [database token](/influxdb/clustered/admin/tokens/).
InfluxDB API endpoints require each request to be authenticated with a [database token](/influxdb/clustered/admin/tokens/#database-tokens).
### Authenticate with a token
Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/) that has the necessary permissions for the operation.
Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/#database-tokens) that has the necessary permissions for the operation.
`Bearer` and `Token` are equivalent in InfluxDB Clustered.
The `Token` scheme is used in the InfluxDB 2.x API.
@ -98,7 +98,7 @@ curl --post "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&pre
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
## Responses

View File

@ -334,8 +334,8 @@ You would create the following InfluxDB {{< current-version >}} databases:
3. **Create a database token for writing to your InfluxDB Clustered database.**
Use the [`influxctl token create` command](/influxdb/clustered/admin/tokens/create/)
to [create a database token](/influxdb/clustered/admin/tokens/create/) with
Use the [`influxctl token create` command](/influxdb/clustered/reference/cli/influxctl/token/create/)
to [create a database token](/influxdb/clustered/admin/tokens/database/create/) with
_write_ permission to your database.
Provide the following:

View File

@ -166,7 +166,7 @@ to complete the migration.
1. [Create a database](/influxdb/clustered/admin/databases/create/)
**to migrate data to**.
2. [Create a token](/influxdb/clustered/admin/tokens/create/)
2. [Create a database token](/influxdb/clustered/admin/tokens/database/create/)
with **write access** to the database you want to migrate to.
2. **In the InfluxDB Cloud (TSM) organization you're migrating data _from_**:

View File

@ -70,10 +70,10 @@ instantiate two InfluxDB clients:
Provide the following credentials for each client:
- **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_
- **token**: [InfluxDB database token](/influxdb/clustered/admin/tokens/)
- **host**: your {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_
- **token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read and write permissions on the databases you want to query and write to.
- **database**: InfluxDB database name
- **database**: your [database](/influxdb/clustered/admin/databases/) name
{{% code-placeholders "((RAW_|DOWNSAMPLED_)*DATABASE)_(NAME|TOKEN)" %}}
```py

View File

@ -65,11 +65,11 @@ Use the `InfluxDBClient3` function in the `influxdb_client_3` module to
instantiate an InfluxDB client.
Provide the following credentials:
- **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_
- **org**: InfluxDB organization name
- **token**: [InfluxDB database token](/influxdb/clustered/admin/tokens/)
- **host**: your {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_
- **org**: your InfluxDB organization name
- **token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
read permissions on the database you want to query
- **database**: InfluxDB database name
- **database**: your [database](/influxdb/clustered/admin/databases/) name
{{% code-placeholders "DATABASE_(NAME|TOKEN)" %}}
```py

View File

@ -107,8 +107,10 @@ print(dataframe)
2. Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [token](/influxdb/clustered/admin/tokens/) with _read_ permission on the specified database
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with _read_ permission on the specified database
3. In your terminal, use the Python interpreter to run the file:
@ -213,8 +215,10 @@ print(dataframe.to_markdown())
Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/clustered/admin/tokens/) with read permission on the specified database.
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read permission on the specified database
### Downsample time series

View File

@ -95,8 +95,10 @@ print(querySQL())
2. Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/clustered/admin/tokens/) with read permissions on the databases you want to query.
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read permissions on the databases you want to query
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query
3. In your terminal, use the Python interpreter to run the file:
@ -153,8 +155,11 @@ print(table.group_by('room').aggregate([('temp', 'mean')]))
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/clustered/admin/tokens/) with read permissions on the databases you want to query.
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/clustered/admin/tokens/) to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read permissions on the databases you want to query
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the [database](/influxdb/clustered/admin/databases/) to query
{{< expand-wrapper >}}
{{% expand "View example results" %}}

View File

@ -38,7 +38,7 @@ If you haven't already, [download and install Chronograf](/chronograf/v1/introdu
- **Connection Name:** Name to uniquely identify this connection configuration
- **Username:** Arbitrary string _(ignored, but cannot be empty)_
- **Password:** InfluxDB [database token](/influxdb/clustered/admin/tokens/)
- **Password:** InfluxDB [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read permissions on the database you want to query
- **Telegraf Database Name:** InfluxDB [database](/influxdb/clustered/admin/databases/)
Chronograf uses to populate parts of the application, including the Host List page (default is `telegraf`)

View File

@ -91,8 +91,8 @@ When creating an InfluxDB data source that uses SQL to query data:
2. Under **InfluxDB Details**:
- **Database**: Provide a default database name to query.
- **Token**: Provide an [API token](/influxdb/clustered/admin/tokens/)
- **Database**: Provide a default [database](/influxdb/clustered/admin/databases/) name to query.
- **Token**: Provide a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read access to the databases you want to query.
3. Click **Save & test**.
@ -117,10 +117,10 @@ When creating an InfluxDB data source that uses InfluxQL to query data:
2. Under **InfluxDB Details**:
- **Database**: Provide a default database name to query.
- **Database**: Provide a default [database](/influxdb/clustered/admin/databases/) name to query.
- **User**: Provide an arbitrary string.
_This credential is ignored when querying {{% product-name %}}, but it cannot be empty._
- **Password**: Provide an [API token](/influxdb/clustered/admin/tokens/)
- **Password**: Provide a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read access to the databases you want to query.
- **HTTP Method**: Choose one of the available HTTP request methods to use when querying data:

View File

@ -85,9 +85,9 @@ Setting `useSystemTrustStore=false` is only necessary on macOS and doesn't actua
_See an [example connection URL](#example-connection-url)._
- **Dialect**: PostreSQL
- **Dialect**: PostgreSQL
- **Username**: _Leave empty_
- **Password**: [Database token](/influxdb/clustered/admin/tokens/)
- **Password**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read access to the specified database
- **Properties File**: _Leave empty_

View File

@ -110,8 +110,8 @@ In your `influxdb_go_client` module directory, create a file named `query.go` an
Replace the following configuration values in the sample code:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/clustered/admin/tokens/) with _read_ permission on the specified database
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ permission on the specified database
{{% tabs-wrapper %}}
{{% tabs %}}

View File

@ -61,7 +61,7 @@ Execute queries and retrieve data over the Flight+gRPC protocol, and then proces
This guide assumes the following prerequisites:
- an {{% product-name %}} [database](/influxdb/clustered/admin/databases/) with data to query
- a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the database
- a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the database
To learn how to set up InfluxDB and write data, see the [Setup instructions](/influxdb/clustered/get-started/setup/) in the Get Started tutorial.
@ -284,7 +284,7 @@ For more information, see [`influxdb_client_3` query exceptions](/influxdb/clust
Replace the following configuration values:
- **`database`**: the name of the [{{% product-name %}} database](/influxdb/clustered/admin/databases/) to query
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
### Execute a query
@ -402,7 +402,7 @@ print(table.group_by('room').aggregate([('temp', 'mean')]))
Replace the following configuration values:
- **`database`**: the name of the [{{% product-name %}} database](/influxdb/clustered/admin/databases/) to query
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database.
- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
Next, learn how to use Python tools to work with time series data:

View File

@ -32,8 +32,8 @@ The `influxctl query` command only supports SQL queries; not InfluxQL.
Provide the following with your command:
- **Database token**: [Database token](/influxdb/clustered/admin/tokens/)
with read permissions on the queried database. Uses the `token` setting from
- **Database token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with read permissions on the specified database. Uses the `token` setting from
the [`influxctl` connection profile](/influxdb/clustered/reference/cli/influxctl/#configure-connection-profiles)
or the `--token` command flag.
- **Database name**: Name of the database to query. Uses the `database` setting

View File

@ -67,7 +67,7 @@ Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the [database](/influxdb/clustered/admin/databases/) to query.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database.
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database.
{{% note %}}
#### Authenticate with username and password
@ -76,7 +76,7 @@ If using basic authentication or query string authentication (username and passw
to interact with the v1 HTTP query API, provide the following credentials:
- **username**: an arbitrary string _({{< product-name >}} ignores the username)_
- **password**: a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database.
- **password**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database.
{{< code-tabs-wrapper >}}
{{% code-tabs %}}

View File

@ -92,7 +92,9 @@ assert 'logical_plan' in df.plan_type.values, "Expect logical_plan"
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
sufficient permissions to the specified database
{{% /expand %}}
{{% /expand-wrapper %}}

View File

@ -7,6 +7,8 @@ menu:
influxdb_clustered:
parent: influxctl
weight: 201
related:
- /influxdb/clustered/admin/tokens/management/
---
The `influxctl management` command and its subcommands manage management tokens

View File

@ -7,6 +7,8 @@ menu:
influxdb_clustered:
parent: influxctl management
weight: 301
related:
- /influxdb/clustered/admin/tokens/management/create/
---
The `influxctl management create` command creates a management token to be used

View File

@ -7,6 +7,8 @@ menu:
influxdb_clustered:
parent: influxctl management
weight: 301
related:
- /influxdb/clustered/admin/tokens/management/list/
---
The `influxctl management list` command lists all management tokens used to

View File

@ -7,6 +7,8 @@ menu:
influxdb_clustered:
parent: influxctl management
weight: 301
related:
- /influxdb/clustered/admin/tokens/management/revoke/
---
The `influxctl management revoke` command revokes management token access

View File

@ -151,6 +151,6 @@ print(data_frame.to_markdown())
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database
{{% /code-tabs-wrapper %}}

View File

@ -94,7 +94,7 @@ client = FlightSQLClient(host='{{< influxdb/host >}}',
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with read permissions on the databases you want to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the database you want to query
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
### Instance methods

View File

@ -57,7 +57,7 @@ Use the Go library to write and query data from InfluxDB.
)
```
2. Define variables for your InfluxDB [database](/influxdb/clustered/admin/databases/) (bucket), organization (required, but ignored), and [token](/influxdb/clustered/admin/tokens/).
2. Define variables for your InfluxDB [database](/influxdb/clustered/admin/databases/) (bucket), organization (required, but ignored), and [database token](/influxdb/clustered/admin/tokens/#database-tokens).
```go
bucket := "DATABASE_NAME"

View File

@ -82,7 +82,7 @@ It only works with InfluxDB v2 management APIs.
The client examples include an [`env`](https://github.com/influxdata/influxdb-client-js/blob/master/examples/env.js) module for accessing your InfluxDB properties from environment variables or from `env.js`.
The examples use these properties to interact with the InfluxDB API.
Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/clustered/admin/databases/), organization (required, but ignored), [token](/influxdb/clustered/admin/tokens/), and cluster URL.
Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/clustered/admin/databases/), organization (required, but ignored), [database token](/influxdb/clustered/admin/tokens/#database-tokens), and cluster URL.
```sh
export INFLUX_URL=https://{{< influxdb/host >}}

View File

@ -47,8 +47,8 @@ You'll need the following prerequisites:
```
https://{{< influxdb/host >}}
```
3. Name of the [database](/influxdb/clustered/admin/databases/) to write to.
4. InfluxDB [database token](/influxdb/clustered/admin/tokens/) with permission to write to the database.
3. The name of the [database](/influxdb/clustered/admin/databases/) to write to.
4. A [database token](/influxdb/clustered/admin/tokens/#database-tokens) with permission to write to the database.
_For security reasons, we recommend setting an environment variable to store your token and avoid exposing the raw token value in your script._
## Write data to InfluxDB with Python
@ -64,7 +64,7 @@ Follow the steps to write [line protocol](/influxdb/clustered/reference/syntax/l
import os
```
3. Define variables for your [database name](/influxdb/clustered/admin/databases/), organization (required, but ignored), and [token](/influxdb/clustered/admin/tokens/).
3. Define variables for your [database name](/influxdb/clustered/admin/databases/), organization (required, but ignored), and [database token](/influxdb/clustered/admin/tokens/#database-tokens).
```python
database = "DATABASE_NAME"

View File

@ -101,8 +101,8 @@ func main() {
Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/clustered/admin/tokens/) with _read_ permission on the specified database
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ permission on the specified database
## Class influxdb3.Client

View File

@ -222,7 +222,7 @@ client = InfluxDBClient3(token="DATABASE_TOKEN",
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with read permissions on the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the specified database
##### Initialize a client for batch writing
@ -270,7 +270,7 @@ invokes the callback function, if specified, for the response status (success, e
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with read permissions on the specified database
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the specified database
### InfluxDBClient3 instance methods

View File

@ -154,9 +154,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Clustered database
your [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/)
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with _write_ permission to the database
{{% /expand %}}
@ -261,9 +261,9 @@ home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monox
Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Clustered database
your [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/)
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with _write_ permission to the database
{{% /expand %}}
@ -340,9 +340,9 @@ curl --request POST \
Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Clustered database
your [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/)
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /expand %}}
@ -423,9 +423,9 @@ curl --request POST \
Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Clustered database
your [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/)
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /expand %}}
@ -494,9 +494,9 @@ curl --request POST \
Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
your InfluxDB Clustered database
your [database](/influxdb/clustered/admin/databases/)
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/)
a [database token](/influxdb/clustered/admin/tokens/#database-tokens)
with sufficient permissions to the specified database
{{% /expand %}}

View File

@ -136,7 +136,9 @@ curl --request POST "https://{{< influxdb/host >}}/api/v2/write?org=ignored&buck
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
_write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
{{% /tab-content %}}
@ -201,7 +203,9 @@ EOF
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
_write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
2. To test the input and processor, enter the following command:
@ -297,7 +301,9 @@ curl -s "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precisi
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
_write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. To test the input and processor, enter the following command:
@ -385,7 +391,9 @@ The following example creates sample data for two series (the combination of mea
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
_write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. To test the input and aggregator, enter the following command:
@ -474,7 +482,9 @@ The following example shows how to use Telegraf to remove points that repeat fie
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
_write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
3. To test the input and processor, enter the following command:
@ -699,7 +709,9 @@ The Go `multiplier.go` sample code does the following:
Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database.
- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}:
a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with
_write_ access to the specified database.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
5. To test the input and processor, enter the following command:

View File

@ -52,7 +52,7 @@ After setting up InfluxDB and your project, you should have the following:
- {{< product-name >}} credentials:
- [Database](/influxdb/clustered/admin/databases/)
- [Token](/influxdb/clustered/admin/tokens/)
- [Database token](/influxdb/clustered/admin/tokens/#database-tokens)
- Cluster hostname
- A directory for your project.

View File

@ -66,10 +66,10 @@ to write the [home sensor sample data](#home-sensor-data-line-protocol) to your
{{< product-name omit=" Clustered" >}} cluster.
Provide the following:
- Database name using the `--database` flag
- [Database token](/influxdb/clustered/admin/tokens/) (with write permissions
- The [database](/influxdb/clustered/admin/databases/) name using the `--database` flag
- A [database token](/influxdb/clustered/admin/tokens/#database-tokens) (with write permissions
on the target database) using the `--token` flag
- Timestamp precision as seconds (`s`) using the `--precision` flag
- The timestamp precision as seconds (`s`) using the `--precision` flag
- [Line protocol](#construct-line-protocol).
Pass the line protocol in one of the following ways:

View File

@ -100,9 +100,9 @@ To write to {{% product-name %}}, include your {{% product-name omit=" Clustered
##### token
Your {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with _write_ permission to the database.
Your {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _write_ permission to the database.
In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/clustered/admin/tokens/) that has _write_ permission to the database.
In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/clustered/admin/tokens/#database-tokens) that has _write_ permission to the database.
##### organization

View File

@ -119,7 +119,7 @@
{{ else if (eq $type "anchored-list") }}
<ul>
<ul class="children-list">
{{ range $pages.ByWeight }}
{{ $title := cond ( isset .Params "list_title" ) .Params.list_title .Title }}
<li><a href="#{{ anchorize $title }}">{{ $title }}</a></li>