Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

InfluxDB DBRPs API

The InfluxDB 1.x data model includes [databases](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#database)and [retention policies](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp).InfluxDB 2.x replaces databases and retention policies with buckets.To support InfluxDB 1.x query and write patterns in InfluxDB 2.x,databases and retention policies are mapped to buckets using thedatabase and retention policy (DBRP) mapping service.The DBRP mapping service uses the database and retention policyspecified in 1.x compatibility API requests to route operations to a bucket.### Related guides- [Database and retention policy mapping](https://docs.influxdata.com/influxdb/cloud/reference/api/influxdb-1x/dbrp/)

InfluxDB DBRPs API is one of 40 APIs that InfluxDB publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include DBRPs. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, authentication docs, and a getting-started guide.

This API exposes 5 operations across 2 paths, and defines 9 schemas. It is described by OpenAPI 3.0.0.

Requests are made against the base URL https://cloud2.influxdata.com/api/v2.

5 operations 2 paths 9 schemas 1 DELETE2 GET1 PATCH1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
Base URL
https://cloud2.influxdata.com/api/v2
Authentication
HTTP Basic, API Key
Resource Areas
1

Authentication & Security 2

InfluxDB DBRPs API declares 2 security schemes for authenticating requests. It accepts HTTP basic authentication (BasicAuthentication). An API key is passed in the header as Authorization (TokenAuthentication). By default, every request must be authenticated.

  • BasicAuthentication — Basic authentication scheme Use the HTTP Basic authentication scheme for InfluxDB /api/v2 API operations that support it: Syntax Authorization: Basic BASE64ENC…
  • TokenAuthentication — Use the [Token authentication](section/Authentication/TokenAuthentication) scheme to authenticate to the InfluxDB API. In your API requests, send an Authorizat…

Paths & Operations 5

Across 2 paths, the API surfaces 5 operations — 1 DELETE, 2 GET, 1 PATCH, 1 POST. Each is listed below with its method, path, parameters, and response codes.

DBRPs 5

The InfluxDB 1.x data model includes [databases](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/database) and [retention policies](https://docs.influxdata.com/influxd…

GET
/api/v2/dbrps
List database retention policy mappings
GetDBRPs 8 params → 200400401500default
POST
/api/v2/dbrps
Add a database retention policy mapping
PostDBRP 1 param body → 201400401404500default
DELETE
/api/v2/dbrps/{dbrpID}
Delete a database retention policy
DeleteDBRPID 4 params → 204400401404500default
GET
/api/v2/dbrps/{dbrpID}
Retrieve a database retention policy mapping
GetDBRPsID 4 params → 200400401404500default
PATCH
/api/v2/dbrps/{dbrpID}
Update a database retention policy mapping
PatchDBRPID 4 params body → 200400401404500default

Schemas 9

The contract defines 9 schemas that model the data the API accepts and returns. The most detailed are DBRP (8 properties), DBRPCreate (6 properties), Error (4 properties), Links (3 properties). Each schema is shown below with its type and property counts.

Links
object
URI pointers for additional paged results.
3 properties 1 required
DBRPGet
object
1 property
Link
string
URI of resource.
ErrorCode
string
code is the machine-readable error code.
DBRPCreate
object
6 properties 3 required
DBRP
object
8 properties 6 required
DBRPs
object
1 property
Error
object
4 properties 1 required
DBRPUpdate
object
2 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

influxdb-dbrps-api-openapi.yml Raw ↑

Other APIs InfluxDB publishes across the network.

InfluxDB Authorizations (API tokens) API
InfluxDB Bucket Schemas API
InfluxDB Buckets API
InfluxDB Cells API
InfluxDB Checks API
InfluxDB Config API
InfluxDB Dashboards API
InfluxDB Data I/O endpoints API
InfluxDB Delete API
InfluxDB Invokable Scripts API
InfluxDB Labels API
InfluxDB Legacy Authorizations API