Address PR feedback
parent
be8cf9c071
commit
d0526cb7a9
|
@ -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.
|
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
|
## 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.
|
2. Specify your organization, bucket, and authentication token.
|
||||||
3. Define the time range to delete data from with the `--start` and `--stop` flags.
|
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
|
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
|
##### Example delete command
|
||||||
```sh
|
```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.
|
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`.
|
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
|
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
|
##### Example delete request
|
||||||
```sh
|
```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>' \
|
-H 'Authorization: Token <YOURAUTHTOKEN>' \
|
||||||
-d '{
|
-d '{
|
||||||
"start": "1970-01-01T00:00:00.00Z",
|
"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 %}}
|
{{% warn %}}
|
||||||
Using the `/delete` endpoint without a `predicate` deletes all data with
|
Using the `/delete` endpoint without a `predicate` deletes all data with
|
||||||
|
|
Loading…
Reference in New Issue