Address PR feedback

pull/1642/head
noramullen1 2020-10-12 14:25:48 -07:00
parent be8cf9c071
commit d0526cb7a9
1 changed files with 13 additions and 5 deletions

View File

@ -48,13 +48,21 @@ Delete data from buckets you've created. You cannot delete data from system buck
4. Click **Confirm Delete** to delete the selected data.
!-->
Use the `influx` CLI or the InfluxDB API `/delete` endpoint to delete data.
{{% note %}}
The `-p, --predicate` flag is supported in InfluxDB Cloud and InfluxDB OSS 2.0 beta 16 or earlier.
In InfluxDB OSS 2.0rc0, the `influx delete --predicate` flag has been disabled.
{{% /note %}}
## Delete data using the influx CLI
1. Use the [`influx delete` command](/v2.0/reference/cli/influx/delete/) to delete points from InfluxDB.
1. Use the [`influx delete` command](/influxdb/v2.0/reference/cli/influx/delete/) to delete points from InfluxDB.
2. Specify your organization, bucket, and authentication token.
3. Define the time range to delete data from with the `--start` and `--stop` flags.
4. Specify which points to delete using the `--predicate` or `-p` flag and
[Delete predicate syntax](/v2.0/reference/syntax/delete-predicate/).
[Delete predicate syntax](/influxdb/v2.0/reference/syntax/delete-predicate/).
##### Example delete command
```sh
@ -75,11 +83,11 @@ timestamps between the specified `--start` and `--stop` times in the specified b
3. Use the `Authorization` header to provide your InfluxDB authentication token.
4. In your request payload, define the time range to delete data from with `start` and `stop`.
Specify which points to delete using the `predicate` and
[Delete predicate syntax](/v2.0/reference/syntax/delete-predicate/).
[Delete predicate syntax](/influxdb/v2.0/reference/syntax/delete-predicate/).
##### Example delete request
```sh
curl -XPOST http://localhost:9999/api/v2/delete/?org=myOrg&bucket=myBucket \
curl -XPOST http://localhost:8086/api/v2/delete/?org=myOrg&bucket=myBucket \
-H 'Authorization: Token <YOURAUTHTOKEN>' \
-d '{
"start": "1970-01-01T00:00:00.00Z",
@ -88,7 +96,7 @@ curl -XPOST http://localhost:9999/api/v2/delete/?org=myOrg&bucket=myBucket \
}'
```
_For more information, see the [`/delete` API documentation](/v2.0/api/#/paths/~1delete/post)._
_For more information, see the [`/delete` API documentation](/influxdb/v2.0/api/#/paths/~1delete/post)._
{{% warn %}}
Using the `/delete` endpoint without a `predicate` deletes all data with