Buckets
/api/v2/bucketsList buckets
Lists buckets.
InfluxDB retrieves buckets owned by the
organization
associated with the authorization
(API token).
To limit which buckets are returned, pass query parameters in your request.
If no query parameters are passed, InfluxDB returns all buckets up to the
default limit.
InfluxDB OSS v2
- If you use an operator token
to authenticate your request, InfluxDB retrieves resources for all
organizations in the instance.
To retrieve resources for only a specific organization, use the
orgparameter or theorgIDparameter to specify the organization.
Required permissions
| Action | Permission required |
|---|---|
| Retrieve user buckets | read-buckets |
| Retrieve system buckets | read-orgs |
Related Guides
Parameters
Query parameters
offset
integerThe offset for pagination. The number of records to skip.
For more information about pagination parameters, see Pagination.
limit
integer20.20after
stringA resource ID to seek from. Returns records created after the specified record; results don’t include the specified record.
Use after instead of the offset parameter.
For more information about pagination parameters, see Pagination.
org
stringAn organization name.
InfluxDB Cloud
- Doesn’t use the
orgparameter ororgIDparameter. - Lists buckets for the organization associated with the authorization (API token).
InfluxDB OSS v2
- Lists buckets for the specified organization.
orgID
stringAn organization ID.
InfluxDB Cloud
- Doesn’t use the
orgparameter ororgIDparameter. - Lists buckets for the organization associated with the authorization (API token).
InfluxDB OSS v2
- Requires either the
orgparameter ororgIDparameter. - Lists buckets for the specified organization.
name
stringid
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/buckets" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
buckets.buckets
object[]links
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/bucketsCreate a bucket
Creates a bucket and returns the bucket resource. The default data retention period is 30 days.
InfluxDB OSS v2
- A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. Reading or writing to more than 20 buckets at a time can adversely affect performance.
Limitations
- InfluxDB Cloud Free Plan allows users to create up to two buckets.
Exceeding the bucket quota will result in an HTTP
403status code. For additional information regarding InfluxDB Cloud offerings, see InfluxDB Cloud Pricing.
Related Guides
Parameters
Header parameters
Zap-Trace-Span
stringRequest body required
application/jsondescription
stringname
required
stringorgID
required
stringretentionRules
stringrp
stringThe retention policy for the bucket. For InfluxDB 1.x, specifies the duration of time that each data point in the retention policy persists.
If you need compatibility with InfluxDB 1.x, specify a value for the rp property;
otherwise, see the retentionRules property.
Retention policy
is an InfluxDB 1.x concept.
The InfluxDB 2.x and Cloud equivalent is
retention period.
The InfluxDB /api/v2 API uses RetentionRules to configure the retention period.
0schemaType
stringThe schema Type. Default is implicit.
InfluxDB Cloud v2
- Use
explicitto enforce column names, tags, fields, and data types for your data.
InfluxDB OSS v2
- Doesn’t support
explicitbucket schemas.
implicitcurl --request POST \
"http://localhost:8086/api/v2/buckets" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"description": "DESCRIPTION",
"name": "NAME",
"orgID": "ORGID",
"retentionRules": [],
"rp": "0",
"schemaType": "implicit"
}'Responses
createdAt
string <date-time>description
stringid
stringlabels
stringlinks
object{"labels":"/api/v2/buckets/1/labels","members":"/api/v2/buckets/1/members","org":"/api/v2/orgs/2","owners":"/api/v2/buckets/1/owners","self":"/api/v2/buckets/1","write":"/api/v2/write?org=2\u0026bucket=1"}labels
stringmembers
stringorg
stringowners
stringself
stringwrite
stringname
required
stringorgID
stringretentionRules
required
stringrp
stringschemaType
stringimplicittype
stringuser
, systemuserupdatedAt
string <date-time>code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}Retrieve a bucket
Retrieves a bucket.
Use this endpoint to retrieve information for a specific bucket.
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/buckets/{bucketID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
createdAt
string <date-time>description
stringid
stringlabels
stringlinks
object{"labels":"/api/v2/buckets/1/labels","members":"/api/v2/buckets/1/members","org":"/api/v2/orgs/2","owners":"/api/v2/buckets/1/owners","self":"/api/v2/buckets/1","write":"/api/v2/write?org=2\u0026bucket=1"}labels
stringmembers
stringorg
stringowners
stringself
stringwrite
stringname
required
stringorgID
stringretentionRules
required
stringrp
stringschemaType
stringimplicittype
stringuser
, systemuserupdatedAt
string <date-time>Unauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}Update a bucket
Updates a bucket.
Use this endpoint to update properties
(name, description, and retentionRules) of a bucket.
InfluxDB Cloud
- Requires the
retentionRulesproperty in the request body. If you don’t provideretentionRules, InfluxDB responds with an HTTP403status code.
InfluxDB OSS v2
- Doesn’t require
retentionRules.
Related Guides
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsondescription
stringname
stringretentionRules
stringcurl --request PATCH \
"http://localhost:8086/api/v2/buckets/{bucketID}" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"description": "DESCRIPTION",
"name": "NAME",
"retentionRules": []
}'Responses
createdAt
string <date-time>description
stringid
stringlabels
stringlinks
object{"labels":"/api/v2/buckets/1/labels","members":"/api/v2/buckets/1/members","org":"/api/v2/orgs/2","owners":"/api/v2/buckets/1/owners","self":"/api/v2/buckets/1","write":"/api/v2/write?org=2\u0026bucket=1"}labels
stringmembers
stringorg
stringowners
stringself
stringwrite
stringname
required
stringorgID
stringretentionRules
required
stringrp
stringschemaType
stringimplicittype
stringuser
, systemuserupdatedAt
string <date-time>code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}Delete a bucket
Deletes a bucket and all associated records.
InfluxDB Cloud
Does the following when you send a delete request:
- Validates the request and queues the delete.
- Returns an HTTP
204status code if queued; error otherwise. - Handles the delete asynchronously.
InfluxDB OSS v2
- Validates the request, handles the delete synchronously, and then responds with success or failure.
Limitations
- Only one bucket can be deleted per request.
Related Guides
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/buckets/{bucketID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Success.
InfluxDB Cloud
- The bucket is queued for deletion.
InfluxDB OSS v2
- The bucket is deleted.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/labelsList all labels for a bucket
Lists all labels for a bucket.
Labels are objects that contain labelID, name, description, and color
key-value pairs. They may be used for grouping and filtering InfluxDB
resources.
Labels are also capable of grouping across different resources–for example,
you can apply a label named air_sensor to a bucket and a task to quickly
organize resources.
Related guides
- Use the
/api/v2/labelsInfluxDB API endpoint to retrieve and manage labels. - Manage labels in the InfluxDB UI
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/buckets/{bucketID}/labels" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
labels
stringlinks
stringBad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/labelsAdd a label to a bucket
Adds a label to a bucket and returns the new label information.
Labels are objects that contain labelID, name, description, and color
key-value pairs. They may be used for grouping and filtering across one or
more kinds of resources–for example, you can apply a label named
air_sensor to a bucket and a task to quickly organize resources.
Limitations
- Before adding a label to a bucket, you must create the label if you
haven’t already. To create a label with the InfluxDB API, send a
POSTrequest to the/api/v2/labelsendpoint).
Related guides
- Use the
/api/v2/labelsInfluxDB API endpoint to retrieve and manage labels. - Manage labels in the InfluxDB UI
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
labelID to add to the bucket.application/jsonlabelID
required
stringcurl --request POST \
"http://localhost:8086/api/v2/buckets/{bucketID}/labels" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"labelID": "LABELID"
}'Responses
label
stringlinks
stringBad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/labels/{labelID}Delete a label from a bucket
Parameters
Path parameters
bucketID
required
stringlabelID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/buckets/{bucketID}/labels/{labelID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/membersList all users with member privileges for a bucket
Lists all users for a bucket.
InfluxDB users have permission to access InfluxDB.
Members are users in an organization with access to the specified resource.
Use this endpoint to retrieve all users with access to a bucket.
Related guides
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/buckets/{bucketID}/members" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
objectself
string <uri>users
object[]Bad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/membersAdd a member to a bucket
Add a user to a bucket and return the new user information.
InfluxDB users have permission to access InfluxDB.
Members are users in an organization.
Use this endpoint to give a user member privileges to a bucket.
Related guides
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
required
stringname
stringcurl --request POST \
"http://localhost:8086/api/v2/buckets/{bucketID}/members" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME"
}'Responses
Bad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/members/{userID}Remove a member from a bucket
Removes a member from a bucket.
Use this endpoint to remove a user’s member privileges from a bucket. This
removes the user’s read and write permissions for the bucket.
Related guides
Parameters
Path parameters
userID
required
stringbucketID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/buckets/{bucketID}/members/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Unauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/ownersList all owners of a bucket
Lists all owners of a bucket.
Bucket owners have permission to delete buckets and remove user and member permissions from the bucket.
InfluxDB Cloud
- Doesn’t use
ownerandmemberroles. Use/api/v2/authorizationsto assign user permissions.
Limitations
- Owner permissions are separate from API token permissions.
- Owner permissions are used in the context of the InfluxDB UI.
Required permissions
read-orgs INFLUX_ORG_ID
INFLUX_ORG_ID is the ID of the organization that you want to retrieve a
list of owners for.
Related endpoints
Related guides
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/buckets/{bucketID}/owners" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
links
objectself
string <uri>users
object[]Bad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/ownersAdd an owner to a bucket
Adds an owner to a bucket and returns the owners with role and user detail.
Use this endpoint to create a resource owner for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket.
InfluxDB Cloud
- Doesn’t use
ownerandmemberroles. Use/api/v2/authorizationsto assign user permissions.
Limitations
- Owner permissions are separate from API token permissions.
- Owner permissions are used in the context of the InfluxDB UI.
Required permissions
write-orgs INFLUX_ORG_IDINFLUX_ORG_IDis the ID of the organization that you want to add an owner for.
Related endpoints
Related guides
Parameters
Path parameters
bucketID
required
stringHeader parameters
Zap-Trace-Span
stringRequest body required
application/jsonid
required
stringname
stringcurl --request POST \
"http://localhost:8086/api/v2/buckets/{bucketID}/owners" \
--header "Authorization: Bearer INFLUX_TOKEN" \
--header "Content-Type: application/json" \
--data-raw '{
"id": "ID",
"name": "NAME"
}'Responses
owner role is assigned to the user.
The response body contains the resource owner with
role and user detail.Bad request. The response body contains detail about the error.
InfluxDB OSS v2
- Returns this error if an incorrect value is passed in the
orgparameter ororgIDparameter.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringUnauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/buckets/{bucketID}/owners/{userID}Remove an owner from a bucket
Removes an owner from a bucket.
Use this endpoint to remove a user’s owner role for a bucket.
InfluxDB Cloud
- Doesn’t use
ownerandmemberroles. Use/api/v2/authorizationsto assign user permissions.
Limitations
- Owner permissions are separate from API token permissions.
- Owner permissions are used in the context of the InfluxDB UI.
Required permissions
write-orgs INFLUX_ORG_ID
INFLUX_ORG_ID is the ID of the organization that you want to remove an owner
from.
Related endpoints
Related guides
Parameters
Path parameters
userID
required
stringbucketID
required
stringHeader parameters
Zap-Trace-Span
stringcurl --request DELETE \
"http://localhost:8086/api/v2/buckets/{bucketID}/owners/{userID}" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Unauthorized. The error may indicate one of the following:
- The
Authorization: Tokenheader is missing or malformed. - The API token value is missing from the header.
- The token doesn’t have sufficient permissions to write to this organization and bucket.
code
stringunauthorized.unauthorizedmessage
stringNot found. A requested resource was not found. The response body contains the requested resource type and the name value (if you passed it)–for example:
"organization name \"my-org\" not found""organization not found": indicates you passed an ID that did not match an organization.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
string/api/v2/sources/{sourceID}/bucketsGet buckets in a source
Parameters
Path parameters
sourceID
required
stringQuery parameters
org
stringHeader parameters
Zap-Trace-Span
stringcurl --request GET \
"http://localhost:8086/api/v2/sources/{sourceID}/buckets" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
buckets
object[]links
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringcode
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.