Buckets: getStorageLayout

Returns the storage layout of the specified bucket.

Required permissions

The authenticated user must have thestorage.objects.list IAM permission to use this method.

Request

HTTP request

GET https://storage.googleapis.com/storage/v1/b/bucket/storageLayout

In addition tostandard query parameters, the following query parameters apply to this method.

To see an example of how to include query parameters in a request, see theJSON API Overview page.

Parameters

Parameter nameValueDescription
Path parameters
bucketstring Name of a bucket.
Optional query parameters
prefixstring If set, thestorage.objects.list permission is checked for the specified prefix.

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#storageLayout","bucket":string,"location":string,"locationType":string,"hierarchicalNamespace":{"enabled":boolean},}
Property nameValueDescription
kindstringThe kind of item this is. For buckets, this is alwaysstorage#storageLayout.
bucketstringThe name of the bucket.
locationstringThe location of the bucket. Object data for objects in the bucket resides in physical storage within this location. SeeCloud Storage bucket locations for the authoritative list.
locationTypestringThis property has a value ofregion.
hierarchicalNamespace.enabledbooleanWhether or not hierarchical namespace is enabled for this bucket.

For information about status and error codes returned by this API, see thereference page.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.