Bucket APIedit

The bucket API allows to get a typed JSON document from the bucket configuration based on its name. The following reads bucket settings for the bucket named influx:

Security settings are removed and will not be returned.

GET /buckets/influx

The result of the above get operation is an array of bucket settings, one for each bucket name present in the request url:

[{
   "name": "influx",
   "type": "influxdb",
   "addr": "localhost:8086",
   "database": "telegraf",
   "retention_policy": "autogen",
   "measurement": "loudml"
}]

Use the semicolon separator to specify more than one bucket name in the request url.

The API also allows to check for the existence of a bucket using HEAD, for example:

HEAD /buckets/influx

A top level GET operation will list all configured buckets.

GET /buckets

A new bucket can be configured at run time using the POST method and defining bucket parameters inside the request body.

POST /buckets
{
   ...vendor specific bucket settings.
}

Using curl:

curl -H "Content-Type: application/json" -X POST localhost:8077/buckets --data-binary @bucket.json
Note

The HTTP content type must be application/json

Warning

Use HTTPS transport protocol to avoid the exposure of security settings.

POST /buckets

Buckets can be deleted using the DELETE method. Use the semicolon separator to specify more than one bucket name in the request url.

DELETE /buckets/<bucket_names>