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 Buckets API

Store your data in InfluxDB [buckets](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#bucket).A bucket is a named location where time series data is stored. All bucketshave a [retention period](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#retention-period),a duration of time that each data point persists. InfluxDB drops allpoints with timestamps older than the bucket’s retention period.A bucket belongs to an organization.### Related guides- [Manage buckets](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/)

InfluxDB Buckets 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 Buckets. 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 14 operations across 8 paths, and defines 24 schemas. It is described by OpenAPI 3.0.0.

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

14 operations 8 paths 24 schemas 4 DELETE5 GET1 PATCH4 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 Buckets 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 14

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

Buckets 14

Store your data in InfluxDB [buckets](https://docs.influxdata.com/influxdb/cloud/reference/glossary/bucket). A bucket is a named location where time series data is stored. All buc…

GET
/api/v2/buckets
List buckets
GetBuckets 8 params → 200401500default
POST
/api/v2/buckets
Create a bucket
PostBuckets 1 param body → 201400401403422500default
DELETE
/api/v2/buckets/{bucketID}
Delete a bucket
DeleteBucketsID 2 params → 204400401404500default
GET
/api/v2/buckets/{bucketID}
Retrieve a bucket
GetBucketsID 2 params → 200401404500default
PATCH
/api/v2/buckets/{bucketID}
Update a bucket
PatchBucketsID 2 params body → 200400401403404500default
GET
/api/v2/buckets/{bucketID}/labels
List all labels for a bucket
GetBucketsIDLabels 2 params → 200400401404500default
POST
/api/v2/buckets/{bucketID}/labels
Add a label to a bucket
PostBucketsIDLabels 2 params body → 201400401404422500default
DELETE
/api/v2/buckets/{bucketID}/labels/{labelID}
Delete a label from a bucket
DeleteBucketsIDLabelsID 3 params → 204404default
GET
/api/v2/buckets/{bucketID}/members
List all users with member privileges for a bucket
GetBucketsIDMembers 2 params → 200400401404500default
POST
/api/v2/buckets/{bucketID}/members
Add a member to a bucket
PostBucketsIDMembers 2 params body → 201400401404500default
DELETE
/api/v2/buckets/{bucketID}/members/{userID}
Remove a member from a bucket
DeleteBucketsIDMembersID 3 params → 204401404500default
GET
/api/v2/buckets/{bucketID}/owners
List all owners of a bucket
GetBucketsIDOwners 2 params → 200400401404500default
POST
/api/v2/buckets/{bucketID}/owners
Add an owner to a bucket
PostBucketsIDOwners 2 params body → 201400401404500default
DELETE
/api/v2/buckets/{bucketID}/owners/{userID}
Remove an owner from a bucket
DeleteBucketsIDOwnersID 3 params → 204401404500default

Schemas 24

The contract defines 24 schemas that model the data the API accepts and returns. The most detailed are Bucket (12 properties), PostBucketRequest (6 properties), UserResponse (4 properties), Error (4 properties). Each schema is shown below with its type and property counts.

Link
string
URI of resource.
ErrorCode
string
code is the machine-readable error code.
LabelResponse
object
2 properties
PostBucketRequest
object
6 properties 2 required
RetentionRule
object
3 properties 1 required
ResourceOwner
ResourceMembers
object
2 properties
UserResponse
object
4 properties 1 required
SchemaType
string
Label
object
4 properties
Labels
array
Error
object
4 properties 1 required
PatchRetentionRules
array
Updates to rules to expire or retain data. No rules means no updates.
RetentionRules
array
Retention rules to expire or retain data. The InfluxDB /api/v2 API uses RetentionRules to configure the [retention period](https://docs.influxdata.com/influxdb…
ResourceMember
PatchRetentionRule
object
3 properties 1 required
Buckets
object
2 properties
Bucket
object
12 properties 2 required
Links
object
URI pointers for additional paged results.
3 properties 1 required
LabelsResponse
object
2 properties
PatchBucketRequest
object
An object that contains updated bucket properties to apply.
3 properties
ResourceOwners
object
2 properties
AddResourceMemberRequestBody
object
2 properties 1 required
LabelMapping
object
A label mapping contains a label ID to attach to a resource.
1 property 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

influxdb-buckets-api-openapi.yml Raw ↑

Other APIs InfluxDB publishes across the network.

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