ListBuckets
Updated at:2025-11-03
API description
This API retrieves a list of all buckets owned by the requester.
Request
-
Request syntax
Plain Text1GET / HTTP/1.1 2Host: bj.bcebos.com 3Date: <Date> 4Authorization: <AuthorizationString> -
Request headers
No special parameters
-
Request parameters
No special parameters
Response
| Name | Types | Description |
|---|---|---|
| owner | Object | Bucket owner information |
| +id | String | User ID of bucket owner |
| +displayName | String | The name of the bucket owner |
| buckets | Array | Container storing the information of multiple buckets |
| +bucket | Object | Container storing the information of a bucket |
| +name | String | Bucket name |
| +location | String | Region where the bucket is located |
| +creationDate | Date | Bucket creation time |
| +enableMultiAz | Boolean | Whether the bucket data is multi-AZ distributed. If it is not multi-AZ bucket, the attribute is not returned. |
Plain Text
1> **Note:** If the request lacks user authentication (i.e., anonymous access), it returns `403 Forbidden` with the error message: `AccessDenied`.
Example
-
JSON request example
Note: A single request can return details of up to 100 buckets.
JSON1GET / HTTP/1.1 2Host: bj.bcebos.com 3Date: Wed, 06 Apr 2016 06:34:40 GMT 4Authorization: AuthorizationString -
JSON request response example
JSON1{ 2 "owner":{ 3 "id":"10eb6f5ff6ff4605bf044313e8f3ffa5", 4 "displayName":"BosUser" 5 }, 6 "buckets":[ 7 { 8 "name":"bucket1", 9 "location":"bj", 10 "creationDate":"2016-04-05T10:20:35Z", 11 "enableMultiAz":true 12 }, 13 { 14 "name":"bucket2", 15 "location":"bj", 16 "creationDate":"2016-04-05T16:41:58Z" 17 } 18 ] 19}
Note: The naming rule for JSON request response items is camelcase convention with the first letter lowercase.
