Lists all buckets in a specified project, ordered in the list lexicographically by name.
The GET Service method is a simple GET request without a bucket or object scope. The request returns the list of buckets in an XML document in the response body. The request must be authenticated (anonymous requests will fail). By default, only the project owners group can list buckets because they are the owner of all buckets within the project. The project team and project editors groups have only view or write access to buckets, respectively.
If the GET Service request fails, it returns a 403 Forbidden status code. The body of the error response will also contain a message describing the reason why the request failed.
The XML API does not return lists longer than 1000 buckets.
Query string parameters
This request does not typically include query string parameters.
||The authentication string for the request.||Yes|
The length of the request body without headers (in bytes).
* Not required for requests that use chunked transfer encoding.
||The date and time of the request.||Yes|
||The URI for Cloud Storage. For more information, see Request Endpoints.||Yes|
||The project ID of a project.||Yes|
||The project to be billed for charges associated with the request.||No|
Request body elements
This request does not include an XML document in the request body.
GET / HTTP/1.1 Host: storage.googleapis.com Date: DATE Authorization: AUTHENTICATION_STRING Content-Length: 0 x-goog-project-id: PROJECT_ID
The request can return a variety of response headers depending on the request headers you use.
Response body elements
|ListAllMyBucketsResult||Container for bucket information.|
|Buckets||Container for information about the owner's buckets.|
|Bucket||Container for information about a specific bucket.|
|Name||Name of the bucket.|
|CreationDate||Creation date for the bucket.|