fix delete api examples in enterprise, closes #4799 (#4800)

pull/4801/head^2
Scott Anderson 2023-03-14 14:38:55 -06:00 committed by GitHub
parent 3b44bea963
commit aeae2888e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -212,24 +212,26 @@ The [`/api/v2/delete`](/influxdb/latest/api/#tag/Delete) endpoint accepts `POST`
Delete all points in a specified time range:
```bash
curl --request POST "http://localhost:8086/api/v2/delete/exampleDB/autogen \
curl --request POST "http://localhost:8086/api/v2/delete?bucket=exampleDB/autogen \
--header 'Authorization: Token YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"start": "2020-03-01T00:00:00Z",
"stop": "2020-11-14T00:00:00Z"
}'
```
Delete points in a specific measurement with a specific tag value:
```bash
curl --request POST "http://localhost:8086/api/v2/delete/exampleDB/autogen \
curl --request POST "http://localhost:8086/api/v2/delete?bucket=exampleDB/autogen \
--header 'Authorization: Token YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"start": "2020-03-01T00:00:00Z",
"stop": "2020-11-14T00:00:00Z"
"stop": "2020-11-14T00:00:00Z",
"predicate": "_measurement=\"example-measurement\" AND exampleTag=\"exampleTagValue\""
}'
```
If you use the `predicate` option in your request, review [delete predicate syntax](/influxdb/latest/reference/syntax/delete-predicate/) and note its [limitations](/influxdb/latest/reference/syntax/delete-predicate/#limitations).