influxdata / influxdb-python

Python client for InfluxDB
MIT License
1.7k stars 521 forks source link

Delete API not working #865

Closed dilipbm closed 4 years ago

dilipbm commented 4 years ago
token = "TOKEN"
org = "ORG"
bucket = "BUCKET"

client = InfluxDBClient(url=HOST", token=token)

delete_api = client.delete_api()
delete_api.delete(
    "1970-01-01T00:00:00Z",
    "2020-12-01T00:00:00Z",
    '_measurement="conso_elec"',
    bucket=bucket,
    org=org,
)

This code throw an Not implemented exception. It seems to me that the delete with predicate API /api/v2/delete has been disabled in this version of influxdb (https://docs.influxdata.com/influxdb/v2.0/reference/syntax/delete-predicate/)

newskooler commented 4 years ago

You are writing in the wrong influx python repo. It should be here: https://github.com/influxdata/influxdb-client-python I noticed this today and just figured out that this was indeed a bug which needs fixing: https://github.com/influxdata/influxdb-client-python/issues/168

dilipbm commented 4 years ago

Thank you snenkov. Of cours it is not the right one