Merge pull request #567 from influxdata/cli/delete-cmd

New 'influx delete' command
pull/578/head
Scott Anderson 2019-10-30 11:34:08 -06:00 committed by GitHub
commit 39365a3b04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 127 additions and 84 deletions

View File

@ -47,6 +47,7 @@ retrieving authentication tokens._
|:------- |:----------- |
| [auth](/v2.0/reference/cli/influx/auth) | Authorization management commands |
| [bucket](/v2.0/reference/cli/influx/bucket) | Bucket management commands |
| [delete](/v2.0/reference/cli/influx/delete) | Delete points from InfluxDB |
| [help](/v2.0/reference/cli/influx/help) | Help about any command |
| [org](/v2.0/reference/cli/influx/org) | Organization management commands |
| [ping](/v2.0/reference/cli/influx/ping) | Check the InfluxDB `/health` endpoint |
@ -62,5 +63,5 @@ retrieving authentication tokens._
|:---- |:----------- |:----------:|
| `-h`, `--help` | Help for the influx command | |
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -38,5 +38,5 @@ influx auth [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx auth active [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -40,5 +40,5 @@ influx auth create [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx auth delete [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -29,5 +29,5 @@ influx auth find [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx auth inactive [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -34,5 +34,5 @@ influx bucket [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -27,5 +27,5 @@ influx bucket create [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx bucket delete [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -28,5 +28,5 @@ influx bucket find [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -27,5 +27,5 @@ influx bucket update [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -0,0 +1,42 @@
---
title: influx delete Delete data from InfluxDB
description: The 'influx delete' command deletes points from an InfluxDB bucket.
menu:
v2_0_ref:
name: influx delete
parent: influx
weight: 101
v2.0/tags: [delete]
---
The `influx delete` command deletes [points](/v2.0/reference/glossary/#point)
from an InfluxDB bucket.
## Usage
```
influx delete [flags]
```
{{% warn %}}
Running `influx delete` without the `-p` or `--predicate` flag deletes all data with
timestamps between the specified `--start` and `--stop` times in the specified bucket.
{{% /warn %}}
## Flags
| Flag | Description | Input type |
|:---- |:----------- |:----------:|
| `-b`, `--bucket` | The name of bucket to remove data from | string |
| `--bucket-id` | The ID of the bucket to remove data from | string |
| `-h`, `--help` | Help for the `delete` command | |
| `-o`, `--org` | The name of the organization that owns the bucket | string |
| `--org-id` | The ID of the organization that owns the bucket | string |
| `-p`, `--predicate` | SQL-like predicate string (i.e. `tag1="v1" and tag2=123`) | string |
| `--start` | The start time in RFC3339 format (i.e. `2009-01-02T23:00:00Z`) | string |
| `--stop` | The stop time in RFC3339 format (i.e. `2009-01-02T23:00:00Z`) | string |
## Global flags
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -24,5 +24,5 @@ influx help [command] [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -38,5 +38,5 @@ influx org [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx org create [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx org delete [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -26,5 +26,5 @@ influx org find [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -33,5 +33,5 @@ influx org members [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -27,5 +27,5 @@ influx org members add [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -26,5 +26,5 @@ influx org members list [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -27,5 +27,5 @@ influx org members remove [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -26,5 +26,5 @@ influx org update [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -29,5 +29,5 @@ influx ping [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -29,5 +29,5 @@ influx query [query literal or @/path/to/query.flux] [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -34,5 +34,5 @@ Use **ctrl + d** to exit the REPL.
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -28,5 +28,5 @@ influx setup [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -37,5 +37,5 @@ influx task [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -26,5 +26,5 @@ influx task create [query literal or @/path/to/query.flux] [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx task delete [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -29,5 +29,5 @@ influx task find [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -31,5 +31,5 @@ influx task log [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -27,5 +27,5 @@ influx task log find [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -26,5 +26,5 @@ influx task retry [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -32,5 +32,5 @@ influx task run [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -30,5 +30,5 @@ influx task run find [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -26,5 +26,5 @@ influx task update [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -34,5 +34,5 @@ influx user [command]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx user create [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -25,5 +25,5 @@ influx user delete [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -26,5 +26,5 @@ influx user find [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -27,5 +27,5 @@ influx user update [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |

View File

@ -33,5 +33,5 @@ influx write [line protocol or @/path/to/points.txt] [flags]
| Global flag | Description | Input type |
|:----------- |:----------- |:----------:|
| `--host` | HTTP address of InfluxDB (default `http://localhost:9999`) | string |
| `--local` | Run commands locally against the filesystem | |
| `-t`, `--token` | API token to be used throughout client calls | string |
| `--local` | Run commands against the local filesystem | |
| `-t`, `--token` | API token to use in client calls | string |