On Delete data | InfluxDB OSS 2.0 Documentation I read that the “--predicate
flag is currently disabled”, so I’m trying to delete data directly using the API.
Initially, I tried the following:
curl --request POST "http://192.168.0.31:8086/api/v2/delete/?org=test&bucket=loggerdownsampled" \
--header 'Authorization: Token XXXXXXXX==' \
--header 'Content-Type: application/json' \
--data '{
"start": "1970-01-01T00:00:00.00Z",
"stop": "2021-01-01T00:00:00.00Z",
"predicate": "_measurement=\"KVMWIN10\"" }'
Nothing was deleted.
I also tried “measurement” (without the leading underscore) in the predicate, and eventually - as a test -I removed the predicate altogether. In none of the cases was any data deleted.
Another thing I noticed is that, as long as my token is correct, the server does not reply with any data. (not even an empty JSon response, but literally 0 bytes)
Am I correct in concluding that deleting data is not yet implemented in InfluxDB 2.0?
Edit: I’m using InfluxDB 2.0.0-rc.4 (git: 778b9ff9eb) build_date: 2020-11-10T05:19:31Z
Edit: It looks like InlfuxDB doesn’t evaluate the posted JSON data. The following does not return any error:
curl --request POST "http://192.168.0.31:8086/api/v2/delete/?org=test&bucket=loggerdownsampled" \
--header 'Authorization: Token XXXXXXXXXXXXXXX==' \
--header 'Content-Type: application/json' \
--data 'This is certainly not valid JSON data'
Regards,
Tom