# DBRP mapping command does not work

**URL:** <https://community.influxdata.com/t/dbrp-mapping-command-does-not-work/15537>\
**Category:** InfluxDB 2\
**Created:** [August 10, 2020, 4:10am UTC](https://community.influxdata.com/t/dbrp-mapping-command-does-not-work/15537 "2020-08-10T04:10:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheyert](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@cheyert](https://community.influxdata.com/u/cheyert)\
**Post date:** [August 10, 2020, 4:10am UTC](https://community.influxdata.com/t/dbrp-mapping-command-does-not-work/15537/1 "2020-08-10T04:10:50Z")

</div>

````auto

curl -XPOST https://us-central1-1.gcp.cloud2.influxdata.com/api/v2/dbrps \
  -H "Authorization: Token YourAuthToken" \
  -H 'Content-type: application/json' \
  -d '{
        "organization": "example-org",
        "bucket_id": "12ab34cd56ef",
        "database": "example-db",
        "retention_policy": "example-rp",
        "default": true
      }'

as is explained on this page
https://v2.docs.influxdata.com/v2.0/reference/api/influxdb-1x/dbrp/

```but that just compains about invalid json structure...doesn't look particularly wrong to me, so wondering how to fix this?
````

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [August 10, 2020, 3:54pm UTC](https://community.influxdata.com/t/dbrp-mapping-command-does-not-work/15537/2 "2020-08-10T15:54:16Z")

</div>

Hello @cheyert,  
Does any curl request work for you? For example, can you write data like so?

```auto
curl -XPOST "http://localhost:9999/api/v2/write?org=my-org&bucket=my-bucket&precision=s" \
  --header "Authorization: Token MYTOKEN" \
  --data-raw "mymeasurement,mytag=yay myfield=20"

```

Can you run  
`show databases` and `show retention policies` to ensure that you have that database and retention policy?

---

<div class="post-metadata">

**Author:** ![cheyert](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@cheyert](https://community.influxdata.com/u/cheyert)\
**Post date:** [August 10, 2020, 7:07pm UTC](https://community.influxdata.com/t/dbrp-mapping-command-does-not-work/15537/3 "2020-08-10T19:07:38Z")

</div>

I think we are mixing 2 instances…  
the localhost link works for a local instance of InfluxDB, but I am trying to find out about databases in the cloud

> **[InfluxDB](https://us-central1-1.gcp.cloud2.influxdata.com)**
>
> InfluxDB is a time series platform, purpose-built by InfluxData for storing metrics and events, provides real-time visibility into stacks, sensors, and systems.

I can get data out of influxDB cloud using flux queries in Grafana, but for one particular plugin (grafana worldmap ) this doesn’t seem to work. I can’t find any example.  
I don’t know what the database name is that goes with my bucket, so I am trying to map these…so that I can perhaps use InfluxQL to get gps coordinates, as I know that works with a local instance of InfluxDB…just not InfluxDB cloud

---

<div class="post-metadata">

**Author:** ![Hagabard](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/hagabard/32/6899_2.png) [@Hagabard](https://community.influxdata.com/u/Hagabard)\
**Post date:** [March 8, 2021, 6:55pm UTC](https://community.influxdata.com/t/dbrp-mapping-command-does-not-work/15537/4 "2021-03-08T18:55:46Z")

</div>

I am also unable to get the DRBP mapping commands to work, although I am trying to use CLI.

influxdb:~$ influx v1 dbrp create -h  
Create a database and retention policy mapping to an existing bucket

Usage:  
influx v1 dbrp create [flags]

Flags:  
-c, --active-config string Config name to use for command; Maps to env var $INFLUX\_ACTIVE\_CONFIG  
–bucket-id ID The ID of the bucket to be mapped  
–configs-path string Path to the influx CLI configurations; Maps to env var $INFLUX\_CONFIGS\_PATH (default “/home/kloen/.influxdbv2/configs”)  
–db string The name of the database  
–default Identify this retention policy as the default for the database  
-h, --help Help for the create command  
–hide-headers Hide the table headers; defaults false; Maps to env var $INFLUX\_HIDE\_HEADERS  
–host string HTTP address of InfluxDB; Maps to env var $INFLUX\_HOST  
–json Output data as json; defaults false; Maps to env var $INFLUX\_OUTPUT\_JSON  
-o, --org string The name of the organization; Maps to env var $INFLUX\_ORG  
–org-id string The ID of the organization; Maps to env var $INFLUX\_ORG\_ID  
–rp string The name of the retention policy  
–skip-verify Skip TLS certificate chain and host name verification.  
-t, --token string Authentication token; Maps to env var $INFLUX\_TOKEN

influxdb:~$ influx v1 drbp create --db mydabase --rp some\_rp --bucket-id 1234567890123456 --default  
Error: unknown flag: --db  
See ‘influx v1 -h’ for help

influxdb:~$ influx v1 drbp create --rp some\_rp --bucket-id 1234567890123456 --default  
Error: unknown flag: --rp  
See ‘influx v1 -h’ for help

influxdb:~$ influx v1 drbp create --bucket-id 1234567890123456 --default  
Error: unknown flag: --bucket-id  
See ‘influx v1 -h’ for help

Running InfluxDB2 v2.0.4 installed from official .deb package.

This is preventing us from being able to use all of our Grafana dashboards built on v1 over the last few years.
