Delete (v2 compatible)

Delete data using InfluxDB v2-compatible predicate expressions. Provides forward compatibility with InfluxDB 2.x client libraries and InfluxDB Enterprise 1.8+.
POST /api/v2/delete v2

Delete data (v2 compatible)

Delete data from InfluxDB Enterprise using predicate expressions. Supports deletion by tag value, timestamp, and measurement.

Predicate Syntax:

_measurement="example" AND tagKey="tagValue"

See delete predicate syntax for detailed syntax and limitations.

Parameters

Query parameters
bucket required string
Database and retention policy in format database/retention-policy
precision string
Timestamp precision
Allowed values: ns , us , ms , s

Request body required

Content-Type: application/json
predicate string
InfluxQL-like predicate expression to filter data to delete. Example: _measurement="example" AND tagKey="tagValue"
start required string <date-time>
Start time (inclusive)
stop required string <date-time>
Stop time (exclusive)
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/delete?bucket=BUCKET" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "predicate": "PREDICATE",
  "start": "START",
  "stop": "STOP"
}'

Responses

204 Delete successful
400 Bad request
error required string
Error message
401 Unauthorized
error required string
Error message

Was this page helpful?

Thank you for your feedback!