/query does not work in 2.0.2

I’m having the following issue for a mapped bucket:

curl --request GET http://localhost:8086/query \
> --header "Authorization: Token <token>" \
> --data-urlencode "db=<db>" \
> --data-urlencode "rp=autogen" \
> --data-urlencode "q=SELECT * FROM <measurment>"

and response is {}
I can see in logs it does not receive my query at all:
ts=2020-12-09T11:26:08.379293Z lvl=info msg=“executing new query” log_id=0QwcNMnG000 query=

This is in 2.0.2 version.
Any ideas, please?

Hello @doronin,

What is the response from your rpdb mapping when you list them? It should look something like this:

Response from mapping:


  "content": [
    {
      "retention_policy": "forever", 
      "database": "MYBUCKET", 
      "default": true, 
      "organization_id": "04<MyOrgID>3000", 
      "bucket_id": "d7<MyBucketID>d", 
      "id": "06893f64ecd5b000"
    }
  ]

Then when you query, your database param should be:
'MYBUCKET/forever'
Your username should be
‘anais@influxdata.com’
And your password should be:
password='k7LH....<MYTOKEN>

Does that help at all?