Cloud Storage JSON API
  1. buckets
Cloud Storage JSON API
  • buckets
    • /b
      GET
    • /b
      POST
    • /b/{bucket}
      DELETE
    • /b/{bucket}
      GET
    • /b/{bucket}
      PATCH
    • /b/{bucket}
      PUT
  • bucketAccessControls
    • /b/{bucket}/acl
      GET
    • /b/{bucket}/acl
      POST
    • /b/{bucket}/acl/{entity}
      DELETE
    • /b/{bucket}/acl/{entity}
      GET
    • /b/{bucket}/acl/{entity}
      PATCH
    • /b/{bucket}/acl/{entity}
      PUT
  • defaultObjectAccessControls
    • /b/{bucket}/defaultObjectAcl
      GET
    • /b/{bucket}/defaultObjectAcl
      POST
    • /b/{bucket}/defaultObjectAcl/{entity}
      DELETE
    • /b/{bucket}/defaultObjectAcl/{entity}
      GET
    • /b/{bucket}/defaultObjectAcl/{entity}
      PATCH
    • /b/{bucket}/defaultObjectAcl/{entity}
      PUT
  • objects
    • /b/{bucket}/o
      GET
    • /b/{bucket}/o
      POST
    • /b/{bucket}/o/watch
      POST
    • /b/{bucket}/o/{object}
      DELETE
    • /b/{bucket}/o/{object}
      GET
    • /b/{bucket}/o/{object}
      PATCH
    • /b/{bucket}/o/{object}
      PUT
    • /b/{destinationBucket}/o/{destinationObject}/compose
      POST
    • /b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}
      POST
  • objectAccessControls
    • /b/{bucket}/o/{object}/acl
    • /b/{bucket}/o/{object}/acl
    • /b/{bucket}/o/{object}/acl/{entity}
    • /b/{bucket}/o/{object}/acl/{entity}
    • /b/{bucket}/o/{object}/acl/{entity}
    • /b/{bucket}/o/{object}/acl/{entity}
  • channels
    • /channels/stop
  1. buckets

/b/{bucket}

GET
/b/{bucket}
buckets
Returns metadata for the specified bucket.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://storage.googleapis.com/storage/v1beta2/b/'
Response Response Example
{
    "acl": [
        {
            "bucket": "string",
            "domain": "string",
            "email": "string",
            "entity": "string",
            "entityId": "string",
            "etag": "string",
            "id": "string",
            "kind": "storage#bucketAccessControl",
            "role": "string",
            "selfLink": "string"
        }
    ],
    "cors": [
        {
            "maxAgeSeconds": 0,
            "method": [
                "string"
            ],
            "origin": [
                "string"
            ],
            "responseHeader": [
                "string"
            ]
        }
    ],
    "defaultObjectAcl": [
        {
            "bucket": "string",
            "domain": "string",
            "email": "string",
            "entity": "string",
            "entityId": "string",
            "etag": "string",
            "generation": "string",
            "id": "string",
            "kind": "storage#objectAccessControl",
            "object": "string",
            "role": "string",
            "selfLink": "string"
        }
    ],
    "etag": "string",
    "id": "string",
    "kind": "storage#bucket",
    "lifecycle": {
        "rule": [
            {
                "action": {
                    "type": "string"
                },
                "condition": {
                    "age": 0,
                    "createdBefore": "2019-08-24",
                    "isLive": true,
                    "numNewerVersions": 0
                }
            }
        ]
    },
    "location": "string",
    "logging": {
        "logBucket": "string",
        "logObjectPrefix": "string"
    },
    "metageneration": "string",
    "name": "string",
    "owner": {
        "entity": "string",
        "entityId": "string"
    },
    "selfLink": "string",
    "storageClass": "string",
    "timeCreated": "2019-08-24T14:15:22Z",
    "versioning": {
        "enabled": true
    },
    "website": {
        "mainPageSuffix": "string",
        "notFoundPage": "string"
    }
}

Request

Path Params
bucket
string 
required
Name of a bucket.
Query Params
ifMetagenerationMatch
string 
optional
Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
ifMetagenerationNotMatch
string 
optional
Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
projection
string 
optional
Set of properties to return. Defaults to noAcl.

Responses

🟢200Successful response
application/json
Body
A bucket.
acl
array[object (BucketAccessControl) {10}] 
optional
Access controls on the bucket.
bucket
string 
optional
The name of the bucket.
domain
string 
optional
The domain associated with the entity, if any.
email
string 
optional
The email address associated with the entity, if any.
entity
string 
optional
The entity holding the permission, in one of the following forms:
user-userId
user-email
group-groupId
group-email
domain-domain
allUsers
allAuthenticatedUsers Examples:
The user liz@example.com would be user-liz@example.com.
The group example@googlegroups.com would be group-example@googlegroups.com.
To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
entityId
string 
optional
The ID for the entity, if any.
etag
string 
optional
HTTP 1.1 Entity tag for the access-control entry.
id
string 
optional
The ID of the access-control entry.
kind
string 
optional
The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.
Default:
storage#bucketAccessControl
role
string 
optional
The access permission for the entity. Can be READER, WRITER, or OWNER.
selfLink
string 
optional
The link to this access-control entry.
cors
array [object {4}] 
optional
The bucket's Cross-Origin Resource Sharing (CORS) configuration.
maxAgeSeconds
integer <int32>
optional
The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.
method
array[string]
optional
The list of HTTP methods on which to include CORS response headers: GET, OPTIONS, POST, etc. Note, "*" is permitted in the list of methods, and means "any method".
origin
array[string]
optional
The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin".
responseHeader
array[string]
optional
The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.
defaultObjectAcl
array[object (ObjectAccessControl) {12}] 
optional
Default access controls to apply to new objects when no ACL is provided.
bucket
string 
optional
The name of the bucket.
domain
string 
optional
The domain associated with the entity, if any.
email
string 
optional
The email address associated with the entity, if any.
entity
string 
optional
The entity holding the permission, in one of the following forms:
user-userId
user-email
group-groupId
group-email
domain-domain
allUsers
allAuthenticatedUsers Examples:
The user liz@example.com would be user-liz@example.com.
The group example@googlegroups.com would be group-example@googlegroups.com.
To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
entityId
string 
optional
The ID for the entity, if any.
etag
string 
optional
HTTP 1.1 Entity tag for the access-control entry.
generation
string <int64>
optional
The content generation of the object.
id
string 
optional
The ID of the access-control entry.
kind
string 
optional
The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
Default:
storage#objectAccessControl
object
string 
optional
The name of the object.
role
string 
optional
The access permission for the entity. Can be READER or OWNER.
selfLink
string 
optional
The link to this access-control entry.
etag
string 
optional
HTTP 1.1 Entity tag for the bucket.
id
string 
optional
The ID of the bucket.
kind
string 
optional
The kind of item this is. For buckets, this is always storage#bucket.
Default:
storage#bucket
lifecycle
object 
optional
The bucket's lifecycle configuration. See object lifecycle management for more information.
rule
array [object {2}] 
optional
A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.
location
string 
optional
The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Typical values are US and EU. Defaults to US. See the developer's guide for the authoritative list.
logging
object 
optional
The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.
logBucket
string 
optional
The destination bucket where the current bucket's logs should be placed.
logObjectPrefix
string 
optional
A prefix for log object names.
metageneration
string <int64>
optional
The metadata generation of this bucket.
name
string 
optional
The name of the bucket.
owner
object 
optional
The owner of the bucket. This is always the project team's owner group.
entity
string 
optional
The entity, in the form group-groupId.
entityId
string 
optional
The ID for the entity.
selfLink
string 
optional
The URI of this bucket.
storageClass
string 
optional
The bucket's storage class. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Typical values are STANDARD and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. See the developer's guide for the authoritative list.
timeCreated
string <date-time>
optional
Creation time of the bucket in RFC 3339 format.
versioning
object 
optional
The bucket's versioning configuration.
enabled
boolean 
optional
While set to true, versioning is fully enabled for this bucket.
website
object 
optional
The bucket's website configuration.
mainPageSuffix
string 
optional
Behaves as the bucket's directory index where missing objects are treated as potential directories.
notFoundPage
string 
optional
The custom object to return when a requested resource is not found.
Modified at 2023-08-15 08:12:16
Previous
/b/{bucket}
Next
/b/{bucket}
Built with