Invalid json structure when Mapping unmapped buckets influx DB

Hi there,

I want to be able to use influx QL on my v2 database. I tried to follow this documentation: Query data with InfluxQL | InfluxDB OSS 2.0 Documentation

I viewed the DBRP mappings succesfully:

I suppose it’s blank because there are none, which makes sense.

Then I tried to create a DBRP mapping with:

curl --request POST "" --header "Authorization: Token -my_token" --header "Content-type: application/json" --data "{"bucketID": "someID", "database": "ambientQuality", "default": true, "orgID": "3ea1813c523490d1", "retention_policy": ""}"

But I always get the same response:

“code”: “invalid”,
“message”: “invalid json structure: invalid character ‘b’ looking for beginning of object key string”

I have also tried doing the same thing using python requests:

import requests
import logging


url = ''
myobj = {"bucketID": "c26f45b24dbd038b", "database": "ambientQuality", "default": True, "orgID": "someID", "retention_policy": ""}
header1={"Authorization":"Token -someToken",  "Content-type": "application/json"}

x =, data = myobj, headers=header1)


DEBUG:urllib3.connectionpool:Starting new HTTP connection (1):
DEBUG:urllib3.connectionpool: “POST /api/v2/dbrps HTTP/1.1” 400 114
“code”: “invalid”,
“message”: “invalid json structure: invalid character ‘b’ looking for beginning of value”

Is this a bug or am I doing something wrong? The problem seems to be that the json response is not correctly formated.

PS: the port is 8089. I did it because port 8086 is being used by Influxdb v1.8