ListBuckets
Returns a list of all buckets owned by the authenticated sender of the request.
Description
The ListBuckets
operation returns a list of all buckets owned by the authenticated sender of the request. The list is returned in alphabetical order by bucket name.
note
- The response is paginated if there are more buckets than can be returned in a single response.
- Use the
continuation-token
parameter to retrieve additional pages of results. - The maximum number of buckets that can be returned in a single response is 1000.
Request Syntax
GET /?max-buckets=MaxBuckets&continuation-token=ContinuationToken&prefix=Prefix HTTP/1.1
Host: qstorage.quilibrium.com
Values in italics indicate user input and should be replaced with actual values.
This operation does not have a request body.
Request Parameters
Headers
Name | Description | Required | Type |
---|
URI Parameters
Name | Description | Required | Type |
---|---|---|---|
continuation-token | Token indicating that the list is being continued. Used for pagination. Length limits: Minimum 0 and maximum of 1024. | No | text |
max-buckets | Maximum number of buckets to return in the response | No | number |
prefix | Limits the response to bucket names that begin with the specified prefix | No | text |
Examples
Example 1: List all buckets
GET / HTTP/1.1
Host: qstorage.quilibrium.com
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
<Owner>
<ID>123456789012</ID>
<DisplayName>user@example.com</DisplayName>
</Owner>
<Buckets>
<Bucket>
<Name>my-bucket-1</Name>
<CreationDate>2024-03-01T12:00:00.000Z</CreationDate>
</Bucket>
<Bucket>
<Name>my-bucket-2</Name>
<CreationDate>2024-03-01T13:00:00.000Z</CreationDate>
</Bucket>
</Buckets>
</ListAllMyBucketsResult>
Values in italics indicate variable response values.
Example 2: List buckets with pagination
GET /?max-buckets=1 HTTP/1.1
Host: qstorage.quilibrium.com
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
<Owner>
<ID>123456789012</ID>
<DisplayName>user@example.com</DisplayName>
</Owner>
<Buckets>
<Bucket>
<Name>my-bucket-1</Name>
<CreationDate>2024-03-01T12:00:00.000Z</CreationDate>
</Bucket>
</Buckets>
<IsTruncated>true</IsTruncated>
<ContinuationToken>eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ==</ContinuationToken>
</ListAllMyBucketsResult>
Values in italics indicate variable response values.
Response Syntax
HTTP/1.1 200 OK
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
Date: ISO8601Date
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
<Owner>
<ID>ID</ID>
<DisplayName>DisplayName</DisplayName>
</Owner>
<Buckets>
<Bucket>
<Name>BucketName</Name>
<CreationDate>ISO8601Date</CreationDate>
</Bucket>
</Buckets>
<IsTruncated>true|false</IsTruncated>
<ContinuationToken>Token</ContinuationToken>
</ListAllMyBucketsResult>
Values in italics indicate variable response values.
Response Elements
Response Headers
Name | Description | Required | Type |
---|---|---|---|
x-amz-id-2 | An identifier for the request | No | String |
x-amz-request-id | A unique identifier for the request | No | String |
Date | The date and time at which the response was sent | No | String |
Content-Type | The content type of the response (application/xml) | No | String |
Response Body Elements
Name | Description | Required | Type |
---|---|---|---|
ListAllMyBucketsResult | Container for response | No | String |
Owner | Container for the bucket owner's information. See Owner for details. | No | String |
Buckets | A list of buckets owned by the requester. See Bucket for details. | No | String |
ContinuationToken | Token to use to retrieve the next page of results. Present only if IsTruncated is true. Type: String | No | String |
Prefix | If Prefix was sent with the request, it will be included in each response. All the returned buckets have this bucket prefix. Type: String | No | String |
Special Errors
Error Code | Description |
---|---|
403 | Forbidden. Authentication failed or you do not have permission to list buckets |
Permissions
You must have the s3:ListAllMyBuckets
permission.
Try It Out
Test ListBuckets
List all buckets owned by the authenticated sender of the request.
Coming Soon
This feature is currently under development and will be available soon.