Buckets: list

Retrieves a list of buckets for a given project.

The authenticated user must be a member of the project's team.

Bucket list operations are eventually consistent.This means that if you create a bucket and then immediately perform a list operation, the newly-created bucket will be immediately available for use, but the bucket might not immediately appear in the returned list of buckets.


HTTP request

GET https://www.googleapis.com/storage/v1/b


Parameter name Value Description
Required query parameters
project string A valid API project identifier.
Optional query parameters
maxResults unsigned integer Maximum number of buckets to return.
pageToken string A previously-returned page token representing part of the larger set of results to view.

The pageToken is an encoded field containing the name of the last item (bucket) in the returned list. In a subsequent request using the pageToken, items that come after the pageToken are shown (up to maxResults).

Bucket list operations are eventually consistent. In addition, if you start a listing and then create a new bucket before using a pageToken to continue listing, you will not see the new bucket in subsequent listing results if it is in part of the bucket namespace already listed.
prefix string Filter results to buckets whose names begin with this prefix.
projection string Set of properties to return. Defaults to noAcl.

Acceptable values are:
  • "full": Include all properties.
  • "noAcl": Omit owner, acl and defaultObjectAcl properties.

Request body

Do not supply a request body with this method.


If successful, this method returns a response body with the following structure:

  "kind": "storage#buckets",
  "nextPageToken": string,
  "items": [
    buckets Resource
Property name Value Description Notes
kind string The kind of item this is. For lists of buckets, this is always storage#buckets.
nextPageToken string The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.

The pageToken is the name of the last item (bucket) in the returned list. In a subsquent list request using the pageToken, items that come after the token are shown (up to maxResults).
items[] list The list of items.

Send feedback about...

Cloud Storage