listBuckets method
Written by
Updated at March 19, 2025
Returns a list of buckets available to the user.
Note
You can authorize in the Amazon S3 HTTP API and tools that support it using static keys obtained for the service account.
You can only view the list of buckets in the folder in which your service account was created.
For more information on getting started with the API and the general request format, see How to use the S3 API.
Request
GET / HTTP/2
Headers
Use only common headers in your requests.
Response
Headers
Responses can only contain common headers.
Response codes
For a list of possible responses, see Responses.
A successful response contains additional data in XML format with the schema described below.
Data schema
<ListAllMyBucketsResult>
<Buckets>
<Bucket>
<Name>bucket-name</Name>
<CreationDate>date_time</CreationDate>
</Bucket>
...
</Buckets>
</ListAllMyBucketsResult>
Element | Description |
---|---|
Bucket |
Contains the bucket description. Path: /ListAllMyBucketsResult/Buckets/Bucket . |
Buckets |
Contains the bucket list. Path: /ListAllMyBucketsResult/Buckets . |
CreationDate |
Bucket creation time in yyyy-mm-ddThh:mm:ss.timezone format.Path: /ListAllMyBucketsResult/Buckets/Bucket/CreationDate . |
ListAllMyBucketsResult |
Root element of the response. Path: /ListAllMyBucketsResult . |
Name |
Bucket name. Path: /ListAllMyBucketsResult/Buckets/Bucket/Name . |