Merge pull request #2299 from influxdata/dar-184
Change to request to --get for --data-urlencodepull/2300/head
commit
5f8efecba6
|
@ -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"
|
||||
```
|
||||
|
|
|
@ -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"
|
||||
```
|
||||
|
|
|
@ -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" \
|
||||
|
|
Loading…
Reference in New Issue