Merge pull request #2299 from influxdata/dar-184

Change to request to --get for --data-urlencode
pull/2300/head
kelseiv 2021-03-16 09:48:06 -07:00 committed by GitHub
commit 5f8efecba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -133,7 +133,7 @@ Include the following in your request:
{{% /note %}}
```sh
curl --request GET https://cloud2.influxdata.com/query?db=example-db \
curl --get https://cloud2.influxdata.com/query?db=example-db \
--header "Authorization: Token YourAuthToken" \
--data-urlencode "q=SELECT used_percent FROM example-db.example-rp.example-measurement WHERE host=host1"
```

View File

@ -203,7 +203,7 @@ Include the following in your request:
{{% /note %}}
```sh
curl --request GET http://localhost:8086/query?db=example-db \
curl --get http://localhost:8086/query?db=example-db \
--header "Authorization: Token YourAuthToken" \
--data-urlencode "q=SELECT used_percent FROM example-db.example-rp.example-measurement WHERE host=host1"
```

View File

@ -87,7 +87,7 @@ The following precisions are available:
##### Query using basic authentication
```sh
curl --request GET http://localhost:8086/query \
curl --get http://localhost:8086/query \
--user "username:YourAuthToken" \
--data-urlencode "db=mydb" \
--data-urlencode "q=SELECT used_percent FROM mem WHERE host=host1"
@ -95,7 +95,7 @@ curl --request GET http://localhost:8086/query \
##### Query a non-default retention policy
```sh
curl --request GET http://localhost:8086/query \
curl --get http://localhost:8086/query \
--user "username:YourAuthToken" \
--data-urlencode "db=mydb" \
--data-urlencode "rp=customrp" \
@ -104,7 +104,7 @@ curl --request GET http://localhost:8086/query \
##### Execute multiple queries
```sh
curl --request GET http://localhost:8086/query \
curl --get http://localhost:8086/query \
--header "Authorization: Token YourAuthToken" \
--data-urlencode "db=mydb" \
--data-urlencode "q=SELECT * FROM mem WHERE host=host1;SELECT mean(used_percent) FROM mem WHERE host=host1 GROUP BY time(10m)"
@ -112,7 +112,7 @@ curl --request GET http://localhost:8086/query \
##### Return query results with millisecond Unix timestamps
```sh
curl --request GET http://localhost:8086/query \
curl --get http://localhost:8086/query \
--header "Authorization: Token YourAuthToken" \
--data-urlencode "db=mydb" \
--data-urlencode "rp=myrp" \
@ -122,7 +122,7 @@ curl --request GET http://localhost:8086/query \
##### Use curl to execute InfluxQL queries from a file
```sh
curl --request GET http://localhost:8086/query \
curl --get http://localhost:8086/query \
--header "Authorization: Token YourAuthToken" \
--data-urlencode "db=mydb" \
--form "q=@path/to/influxql.txt" \