Source Code Bundles
Lists buckets associated with an account, in alphabetical order by bucket name.
When using an authorization token that is restricted to a bucket, you must include the bucketId or bucketName of that bucket in the request, or the request will be denied.
Request HTTP Headers
An authorization token, obtained from
Request HTTP Message Body Parameters
The ID of your account.
When bucketId is specified, the result will be a list containing just this bucket, if it's present in the account, or no buckets if the account does not have a bucket with this ID.
When bucketName is specified, the result will be a list containing just this bucket, if it's present in the account, or no buckets if the account does not have a bucket with this ID.
If present, B2 will use it as a filter for
bucket types returned in the list buckets response. If not present,
only buckets with bucket types "allPublic", "allPrivate" and "snapshot" will be returned.
A special filter value of ["all"] will return all bucket types.
Response HTTP Status 200
Bucket List as a JSON response:
An array of bucket objects (see below).
Each of the items in the array of buckets:
The account that the bucket is in.
The unique ID of the bucket.
The unique name of the bucket
One of: "allPublic", "allPrivate", "snapshot", or other values added in the future. "allPublic" means that anybody can download the files is the bucket; "allPrivate" means that you need an authorization token to download them; "snapshot" means that it's a private bucket containing snapshots created on the B2 web site.
The user data stored with this bucket.
The list of lifecycle rules for this bucket.
A counter that is updated every time the bucket is modified,
and can be used with the
Unable to return Bucket List.
If possible the server will return a JSON error structure. Errors include: