Merge pull request #3883 from influxdata/fix/update-my-org-and-yourauthtoken
fix: update token placeholder v2.1pull/3885/head
commit
16710e9065
|
@ -54,7 +54,7 @@ Provide the following:
|
|||
###### Export all resources to a template
|
||||
```sh
|
||||
# Syntax
|
||||
influx export all -o <org-name> -f <file-path> -t <token>
|
||||
influx export all -o <INFLUX_ORG> -f <FILE_PATH> -t <INFLUX_TOKEN>
|
||||
|
||||
# Example
|
||||
influx export all \
|
||||
|
@ -108,7 +108,7 @@ Provide the following:
|
|||
###### Export specific resources to a template
|
||||
```sh
|
||||
# Syntax
|
||||
influx export all -o <org-name> -f <file-path> -t <token> [resource-flags]
|
||||
influx export all -o <INFLUX_ORG> -f <FILE_PATH> -t <INFLUX_TOKEN> [resource-flags]
|
||||
|
||||
# Example
|
||||
influx export all \
|
||||
|
@ -136,10 +136,10 @@ Provide the following:
|
|||
```sh
|
||||
# Syntax
|
||||
influx export stack \
|
||||
-o <org-name> \
|
||||
-t <token> \
|
||||
-f <file-path> \
|
||||
<stack-id>
|
||||
-o <INFLUX_ORG> \
|
||||
-t <INFLUX_TOKEN> \
|
||||
-f <FILE_PATH> \
|
||||
<STACK_ID>
|
||||
|
||||
# Example
|
||||
influx export stack \
|
||||
|
|
|
@ -65,7 +65,7 @@ to create a new bucket. A bucket requires the following:
|
|||
|
||||
```sh
|
||||
# Syntax
|
||||
influx bucket create -n <bucket-name> -o <org-name> -r <retention-period-duration>
|
||||
influx bucket create -n <BUCKET_NAME> -o <INFLUX_ORG> -r <RETENTION_PERIOD_DURATION>
|
||||
|
||||
# Example
|
||||
influx bucket create -n my-bucket -o my-org -r 72h
|
||||
|
|
|
@ -49,7 +49,7 @@ influx bucket delete -n my-bucket -o my-org
|
|||
<!-- -->
|
||||
```sh
|
||||
# Syntax
|
||||
influx bucket delete -i <bucket-id>
|
||||
influx bucket delete -i <BUCKET_ID>
|
||||
|
||||
# Example
|
||||
influx bucket delete -i 034ad714fdd6f000
|
||||
|
|
|
@ -172,10 +172,10 @@ Provide the following:
|
|||
```sh
|
||||
# Syntax
|
||||
influx export stack \
|
||||
-o <org-name> \
|
||||
-t <token> \
|
||||
-f <file-path> \
|
||||
<stack-id>
|
||||
-o <INFLUX_ORG> \
|
||||
-t <INFLUX_TOKEN> \
|
||||
-f <FILE_PATH> \
|
||||
<STACK_ID>
|
||||
|
||||
# Example
|
||||
influx export stack \
|
||||
|
|
|
@ -43,8 +43,8 @@ Below is an example `curl` request that sends a Flux query to InfluxDB {{< curre
|
|||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl --request POST \
|
||||
http://localhost:8086/api/v2/query?org=my-org \
|
||||
--header 'Authorization: Token YOURAUTHTOKEN' \
|
||||
http://localhost:8086/api/v2/query?orgID=INFLUX_ORG_ID \
|
||||
--header 'Authorization: Token INFLUX_TOKEN' \
|
||||
--header 'Accept: application/csv' \
|
||||
--header 'Content-type: application/vnd.flux' \
|
||||
--data 'from(bucket:"example-bucket")
|
||||
|
@ -57,8 +57,8 @@ curl --request POST \
|
|||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl --request POST \
|
||||
http://localhost:8086/api/v2/query?org=my-org \
|
||||
--header 'Authorization: Token YOURAUTHTOKEN' \
|
||||
http://localhost:8086/api/v2/query?orgID=INFLUX_ORG_ID \
|
||||
--header 'Authorization: Token INFLUX_TOKEN' \
|
||||
--header 'Accept: application/csv' \
|
||||
--header 'Content-type: application/vnd.flux' \
|
||||
--header 'Accept-Encoding: gzip' \
|
||||
|
@ -82,8 +82,8 @@ Below is an example `curl` request that sends an InfluxQL query to InfluxDB {{<
|
|||
|
||||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl --request -G http://localhost:8086/query?org=my-org?database=MyDB&retention_policy=MyRP \
|
||||
--header 'Authorization: Token YOURAUTHTOKEN' \
|
||||
curl --request -G http://localhost:8086/query?orgID=INFLUX_ORG_ID&database=MyDB&retention_policy=MyRP \
|
||||
--header 'Authorization: Token INFLUX_TOKEN' \
|
||||
--header 'Accept: application/csv' \
|
||||
--header 'Content-type: application/json' \
|
||||
--data-urlencode "q=SELECT used_percent FROM example-db.example-rp.example-measurement WHERE host=host1"
|
||||
|
@ -92,8 +92,8 @@ curl --request -G http://localhost:8086/query?org=my-org?database=MyDB&retention
|
|||
|
||||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl --request -G http://localhost:8086/query?org=my-org?database=MyDB&retention_policy=MyRP \
|
||||
--header 'Authorization: Token YOURAUTHTOKEN' \
|
||||
curl --request -G http://localhost:8086/query?orgID=INFLUX_ORG_ID&database=MyDB&retention_policy=MyRP \
|
||||
--header 'Authorization: Token INFLUX_TOKEN' \
|
||||
--header 'Accept: application/csv' \
|
||||
--header 'Content-type: application/json' \
|
||||
--header 'Accept-Encoding: gzip' \
|
||||
|
|
|
@ -17,11 +17,11 @@ Authenticate requests using the [`influx` CLI](/influxdb/v2.1/reference/cli/infl
|
|||
### Add a token to a CLI request
|
||||
|
||||
```sh
|
||||
influx write -t <token> -b BUCKET -o org-name <LINE PROTOCOL>
|
||||
influx write -t <INFLUX_TOKEN> -b <BUCKET_NAME> -o org-name <LINE_PROTOCOL>
|
||||
```
|
||||
|
||||
```
|
||||
export INFLUX_TOKEN=my-token
|
||||
export INFLUX_TOKEN=<INFLUX_TOKEN>
|
||||
influx write -t $INFLUX_TOKEN -b my-bucket -o my-org "measurement field=1"
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue