---
title: Buckets (v2 compatible)
description: Manage databases as buckets using InfluxDB v2-compatible endpoints. Provides forward compatibility with InfluxDB 2.x client libraries and InfluxDB Enterprise 1.8+.
url: https://docs.influxdata.com/enterprise_influxdb/v1/api/buckets-v2-compatible/
estimated_tokens: 3039
product: InfluxDB Enterprise v1
version: v1
---

[Download InfluxDB Enterprise v1 API Spec](/openapi/influxdb-enterprise-v1-openapi.yml)

Manage databases as buckets using InfluxDB v2-compatible endpoints. Provides forward compatibility with InfluxDB 2.x client libraries and InfluxDB Enterprise 1.8+.

GET `/api/v2/buckets` v2

### List buckets (v2 compatible)

List all databases as buckets. Provides forward compatibility with InfluxDB 2.x client libraries.

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/api/v2/buckets" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 List of buckets

`buckets` object\[\]

401 Unauthorized

`error` required string

Error message

POST `/api/v2/buckets` v2

### Create bucket (v2 compatible)

Create a new database as a bucket. Provides forward compatibility with InfluxDB 2.x client libraries.

#### Request body required

Content-Type: `application/json`

`name` required string

Database name

`retentionRules` object\[\]

`everySeconds` integer

Retention period in seconds

`type` string

Allowed: `expire`

Example request [Ask AI about this](#)

```sh
curl --request POST \
  "http://localhost:8086/api/v2/buckets" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "name": "NAME",
  "retentionRules": []
}'
```

#### Responses

201 Bucket created

`id` string

Bucket ID (database/retention-policy)

`name` string

Bucket name

`retentionRules` object\[\]

`everySeconds` integer

`type` string

Allowed: `expire`

401 Unauthorized

`error` required string

Error message

DELETE `/api/v2/buckets/{bucketID}` v2

### Delete bucket (v2 compatible)

Delete a database/retention policy combination. The bucketID format is `database/retention-policy`.

#### Parameters

##### Path parameters

`bucketID` required string

Bucket ID in format `database/retention-policy`

Example request [Ask AI about this](#)

```sh
curl --request DELETE \
  "http://localhost:8086/api/v2/buckets/{bucketID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

204 Bucket deleted

401 Unauthorized

`error` required string

Error message

404 Bucket not found

`error` required string

Error message
