Skip to main content
Version: 1.12.x

Bucket API Specification Reference

The Bucket API allows users to create, modify, and delete buckets.

Before starting to record data, a user must first create a bucket and specify settings such as:

  • Maximum block size
  • Maximum number of records
  • Quota type
  • Quota size

For more information about buckets, read the Bucket Guide.

Get Information about a Bucket​

The method returns the current settings, stats, and entry list of the bucket in JSON format.

If authentication is enabled, the method needs a valid API token.

GET
/api/v1/b/:bucket_name
Get information about a bucket

Check if a Bucket Exists​

If authentication is enabled, the method needs a valid API token.

HEAD
/api/v1/b/:bucket_name
Check if a bucket exists

Create a New Bucket​

To create a bucket, the request should contain a JSON document with some parameters or empty body. The new bucket uses default values if some parameters are empty.

If authentication is enabled, the method needs a valid API token with full access.

Changes:

  • v1.12: HARD quota type was introduced.
POST
/api/v1/b/:bucket_name
Create a new bucket

Change Settings of a Bucket​

To update settings of a bucket, the request should have a JSON document with all the settings.

If authentication is enabled, the method needs a valid API token with full access.

Changes:

  • v1.12: HARD quota type was introduced.
PUT
/api/v1/b/:bucket_name
Change settings of a bucket

Rename a Bucket​

To rename a bucket, the request should have a JSON document with the new name.

If authentication is enabled, the method needs a valid API token with full access.

Changes:

  • v1.12: the endpoint was introduced.
PUT
/api/v1/b/:bucket_name/rename
Rename a bucket

Remove a Bucket​

Remove a bucket with all its entries and stored data.

If authentication is enabled, the method needs a valid API token with full access.

danger

This operation is irreversible. All data in the bucket will be lost.

DELETE
/api/v1/b/:bucket_name
Remove a bucket