Retrieves a list of buckets for a given project, ordered in the list lexicographically by name.
Request
HTTP request
GET https://storage.googleapis.com/storage/v1/b
In addition to standard query parameters , the following query parameters apply to this method.
To see an example of how to include query parameters in a request, see the JSON API Overview page.
Parameters
project
string
maxResults
unsigned integer
maxResults
so the presence of nextPageToken
should
always be checked. The service limits to: - 200 items if
projection=full. - 1,000 items if
projection=noAcl.
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
). For soft-deleted bucket list requests, the pageToken
also contains the generation of the bucket.
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
projection
string
Set of properties to return. Defaults to noAcl
.
Acceptable values are:
-
full: Include all properties. -
noAcl: Omitowner,acl, anddefaultObjectAclproperties.
softDeleted
boolean
true
, only soft-deleted bucket versions are listed as distinct results in order of bucket name and generation number. The default value is false
.Request body
Do not supply a request body with this method.
Response
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. Provide this value as the The |
|
items[]
|
list
|
The list of buckets . |
For information about status and error codes returned by this API, see the reference page .
Try it!
Use the APIs Explorer below to call this method on live data and see the response.

