Delete time series data from InfluxDB 2.0 (Cloud) - problem

Hello,

I’m trying deleting time series data from InfluxDB 2.0 Cloud (using Postman).
I have the following request:

curl --location --request POST ‘https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/delete?org=myxxx-org&bucket=myxxx_bucket
–header ‘Authorization: Token ABcnxlfXYROI5FjfNfA7Mnv9rbJEu0pZ41y_KtizO4GQgj_TapbjTLTnIAWUw5N7ajHPux1eEh7Xeqs6jHhVarw==’
–header ‘Content-Type: text/plain’
–data-raw ‘{
“start”: “2020-03-01T21:51:25Z”,
“stop”: “2020-04-01T21:51:25Z”
}’

I always get:

{
“code”: “forbidden”,
“message”: “insufficient permissions for delete”
}

I use an all access generated token.

Anyone an idea what I’m missing?

Thanks.

Hello @gdillen,
You can delete points with influx delete and delete predicate. I hope that helps!

Hello @Anaisdg Thanks, but unfortunately it doesn’t work for me.
I’m trying with

{
“start”: “2020-04-01T21:51:25Z”,
“stop”: “2020-04-06T21:51:25Z”,
“predicate”: “id=backslash"xxxxxbackslash”"
}

and still get:
{
“code”: “forbidden”,
“message”: “insufficient permissions for delete”
}

Hello @gdillen,
Can you please try something like:

curl -XPOST http://localhost:9999/api/v2/delete/?org=myOrg&bucket=myBucket \
  -H 'Authorization: Token <YOURAUTHTOKEN>' \
  -d '{
        "start": "1970-01-01T00:00:00.00Z",
        "stop": "2020-01-01T00:00:00.00Z",
        "predicate": "_measurement=\"sensors\" and sensorID=\"abc123\""
      }'

Where you specify the series you want to drop in predicate?

Hello @Anaisdg,

Still no success, the same error. I’m doing this on InfluxDB Cloud 2.0, not an own installed instance. I’m sending now:

curl --location --request POST ‘https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/delete?org=myOrg&bucket=myBucket
–header ‘Authorization: Token mytoken==’
–header ‘Content-Type: application/json’
–data-raw ‘{
“start”: “1970-01-01T00:00:00.00Z”,
“stop”: “2020-01-01T00:00:00.00Z”,
“predicate”: “_measurement=\“soilmoisture\” and id=\“sensor\””
}’

@Anaisdg
On my Ubuntu installed instance it works; apparently not with InfluxDB Cloud 2.0?

@gdillen,
Hmm I asked around… looks like the team is still in the process for delivering delete predicate to all cloud users. It looks like that should be added within the next 2 weeks.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.