diff --git a/content/shared/influxdb3-get-started/setup.md b/content/shared/influxdb3-get-started/setup.md index 3024c6f743..d3fdc280ff 100644 --- a/content/shared/influxdb3-get-started/setup.md +++ b/content/shared/influxdb3-get-started/setup.md @@ -445,12 +445,10 @@ influxdb3 create token --admin {{% /code-tab-content %}} {{% code-tab-content %}} -{{% code-placeholders "CONTAINER_NAME" %}} -```bash +```bash { placeholders="CONTAINER_NAME" } # With Docker — in a new terminal: docker exec -it CONTAINER_NAME influxdb3 create token --admin ``` -{{% /code-placeholders %}} Replace {{% code-placeholder-key %}}`CONTAINER_NAME`{{% /code-placeholder-key %}} with the name of your running Docker container. @@ -486,34 +484,54 @@ In your command, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code- Set the `INFLUXDB3_AUTH_TOKEN` environment variable to have the CLI use your token automatically: -{{% code-placeholders "YOUR_AUTH_TOKEN" %}} -```bash +{{< tabs-wrapper >}} +{{% tabs %}} +[macOS and Linux](#) +[PowerShell](#) +[CMD](#) +{{% /tabs %}} +{{% tab-content %}} + +```bash { placeholders="YOUR_AUTH_TOKEN" } export INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN ``` -{{% /code-placeholders %}} + +{{% /tab-content %}} +{{% tab-content %}} + +```powershell { placeholders="YOUR_AUTH_TOKEN" } +$env:INFLUXDB3_AUTH_TOKEN = "YOUR_AUTH_TOKEN" +``` + +{{% /tab-content %}} +{{% tab-content %}} + +```cmd { placeholders="YOUR_AUTH_TOKEN" } +set INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN +# Make sure to include a space character at the end of this command. +``` + +{{% /tab-content %}} +{{< /tabs-wrapper >}} {{% /tab-content %}} {{% tab-content %}} Include the `--token` option with CLI commands: -{{% code-placeholders "YOUR_AUTH_TOKEN" %}} -```bash +```bash { placeholders="YOUR_AUTH_TOKEN" } influxdb3 show databases --token YOUR_AUTH_TOKEN ``` -{{% /code-placeholders %}} {{% /tab-content %}} {{< /tabs-wrapper >}} For HTTP API requests, include your token in the `Authorization` header--for example: -{{% code-placeholders "YOUR_AUTH_TOKEN" %}} -```bash +```bash { placeholders="YOUR_AUTH_TOKEN" } curl "http://{{< influxdb/host >}}/api/v3/configure/database" \ --header "Authorization: Bearer YOUR_AUTH_TOKEN" ``` -{{% /code-placeholders %}} #### Learn more about tokens and permissions