Cloud Storage JSON API
  1. objects
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. objects

/b/{bucket}/o/{object}

PATCH
/b/{bucket}/o/{object}
objects
Updates a data blob's associated metadata. This method supports patch semantics.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://storage.googleapis.com/storage/v1beta2/b//o/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "acl": [
        {
            "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"
        }
    ],
    "bucket": "string",
    "cacheControl": "string",
    "componentCount": 0,
    "contentDisposition": "string",
    "contentEncoding": "string",
    "contentLanguage": "string",
    "contentType": "string",
    "crc32c": "string",
    "etag": "string",
    "generation": "string",
    "id": "string",
    "kind": "storage#object",
    "md5Hash": "string",
    "mediaLink": "string",
    "metadata": {
        "property1": "string",
        "property2": "string"
    },
    "metageneration": "string",
    "name": "string",
    "owner": {
        "entity": "string",
        "entityId": "string"
    },
    "selfLink": "string",
    "size": "string",
    "storageClass": "string",
    "timeDeleted": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z"
}'
Response Response Example
{
    "acl": [
        {
            "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"
        }
    ],
    "bucket": "string",
    "cacheControl": "string",
    "componentCount": 0,
    "contentDisposition": "string",
    "contentEncoding": "string",
    "contentLanguage": "string",
    "contentType": "string",
    "crc32c": "string",
    "etag": "string",
    "generation": "string",
    "id": "string",
    "kind": "storage#object",
    "md5Hash": "string",
    "mediaLink": "string",
    "metadata": {
        "property1": "string",
        "property2": "string"
    },
    "metageneration": "string",
    "name": "string",
    "owner": {
        "entity": "string",
        "entityId": "string"
    },
    "selfLink": "string",
    "size": "string",
    "storageClass": "string",
    "timeDeleted": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z"
}

Request

Path Params
bucket
string 
required
Name of the bucket in which the object resides.
object
string 
required
Name of the object.
Query Params
generation
string 
optional
If present, selects a specific revision of this object (as opposed to the latest version, the default).
ifGenerationMatch
string 
optional
Makes the operation conditional on whether the object's current generation matches the given value.
ifGenerationNotMatch
string 
optional
Makes the operation conditional on whether the object's current generation does not match the given value.
ifMetagenerationMatch
string 
optional
Makes the operation conditional on whether the object's current metageneration matches the given value.
ifMetagenerationNotMatch
string 
optional
Makes the operation conditional on whether the object's current metageneration does not match the given value.
projection
string 
optional
Set of properties to return. Defaults to full.
Body Params application/json
An object.
acl
array[object (ObjectAccessControl) {12}] 
optional
Access controls on the object.
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.
bucket
string 
optional
The bucket containing this object.
cacheControl
string 
optional
Cache-Control directive for the object data.
componentCount
integer <int32>
optional
Number of underlying components that make up this object. Components are accumulated by compose operations and are limited to a count of 32.
contentDisposition
string 
optional
Content-Disposition of the object data.
contentEncoding
string 
optional
Content-Encoding of the object data.
contentLanguage
string 
optional
Content-Language of the object data.
contentType
string 
optional
Content-Type of the object data.
crc32c
string 
optional
CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64.
etag
string 
optional
HTTP 1.1 Entity tag for the object.
generation
string <int64>
optional
The content generation of this object. Used for object versioning.
id
string 
optional
The ID of the object.
kind
string 
optional
The kind of item this is. For objects, this is always storage#object.
Default:
storage#object
md5Hash
string 
optional
MD5 hash of the data; encoded using base64.
mediaLink
string 
optional
Media download link.
metadata
object 
optional
User-provided metadata, in key/value pairs.
Additional properties
string 
optional
An individual metadata entry.
metageneration
string <int64>
optional
The generation of the metadata for this object at this generation. Used for metadata versioning. Has no meaning outside of the context of this generation.
name
string 
optional
The name of this object. Required if not specified by URL parameter.
owner
object 
optional
The owner of the object. This will always be the uploader of the object.
entity
string 
optional
The entity, in the form user-userId.
entityId
string 
optional
The ID for the entity.
selfLink
string 
optional
The link to this object.
size
string <uint64>
optional
Content-Length of the data in bytes.
storageClass
string 
optional
Storage class of the object.
timeDeleted
string <date-time>
optional
Deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
updated
string <date-time>
optional
Modification time of the object metadata in RFC 3339 format.
Examples

Responses

🟢200Successful response
application/json
Body
An object.
acl
array[object (ObjectAccessControl) {12}] 
optional
Access controls on the object.
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.
bucket
string 
optional
The bucket containing this object.
cacheControl
string 
optional
Cache-Control directive for the object data.
componentCount
integer <int32>
optional
Number of underlying components that make up this object. Components are accumulated by compose operations and are limited to a count of 32.
contentDisposition
string 
optional
Content-Disposition of the object data.
contentEncoding
string 
optional
Content-Encoding of the object data.
contentLanguage
string 
optional
Content-Language of the object data.
contentType
string 
optional
Content-Type of the object data.
crc32c
string 
optional
CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64.
etag
string 
optional
HTTP 1.1 Entity tag for the object.
generation
string <int64>
optional
The content generation of this object. Used for object versioning.
id
string 
optional
The ID of the object.
kind
string 
optional
The kind of item this is. For objects, this is always storage#object.
Default:
storage#object
md5Hash
string 
optional
MD5 hash of the data; encoded using base64.
mediaLink
string 
optional
Media download link.
metadata
object 
optional
User-provided metadata, in key/value pairs.
Additional properties
string 
optional
An individual metadata entry.
metageneration
string <int64>
optional
The generation of the metadata for this object at this generation. Used for metadata versioning. Has no meaning outside of the context of this generation.
name
string 
optional
The name of this object. Required if not specified by URL parameter.
owner
object 
optional
The owner of the object. This will always be the uploader of the object.
entity
string 
optional
The entity, in the form user-userId.
entityId
string 
optional
The ID for the entity.
selfLink
string 
optional
The link to this object.
size
string <uint64>
optional
Content-Length of the data in bytes.
storageClass
string 
optional
Storage class of the object.
timeDeleted
string <date-time>
optional
Deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
updated
string <date-time>
optional
Modification time of the object metadata in RFC 3339 format.
Modified at 2023-08-15 08:12:16
Previous
/b/{bucket}/o/{object}
Next
/b/{bucket}/o/{object}
Built with