Skip to main content

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

NameDescriptionRequiredType

URI Parameters

NameDescriptionRequiredType
continuation-tokenToken indicating that the list is being continued. Used for pagination.

Length limits: Minimum 0 and maximum of 1024.
Notext
max-bucketsMaximum number of buckets to return in the responseNonumber
prefixLimits the response to bucket names that begin with the specified prefixNotext

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

NameDescriptionRequiredType
x-amz-id-2An identifier for the requestNoString
x-amz-request-idA unique identifier for the requestNoString
DateThe date and time at which the response was sentNoString
Content-TypeThe content type of the response (application/xml)NoString

Response Body Elements

NameDescriptionRequiredType
ListAllMyBucketsResultContainer for responseNoString
OwnerContainer for the bucket owner's information. See Owner for details.NoString
BucketsA list of buckets owned by the requester. See Bucket for details.NoString
ContinuationTokenToken to use to retrieve the next page of results. Present only if IsTruncated is true.

Type: String
NoString
PrefixIf Prefix was sent with the request, it will be included in each response. All the returned buckets have this bucket prefix.

Type: String
NoString

Special Errors

Error CodeDescription
403Forbidden. 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.