objects

Concatenates a list of existing objects into a new object in the same bucket.

post/b/{destinationBucket}/o/{destinationObject}/compose

Request

  • Base URL: https://storage.googleapis.com/storage/v1
  • URL: https://storage.googleapis.com/storage/v1/b/{destinationBucket}/o/{destinationObject}/compose
  • Auth: one of:
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-platform) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-platform)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/devstorage.full_control) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/devstorage.full_control)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/devstorage.read_write) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/devstorage.read_write)

Path parameters

destinationBucketstring required

Name of the bucket containing the source objects. The destination object is stored in this bucket.

destinationObjectstring required

Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

Query parameters

destinationPredefinedAcl'authenticatedRead' | 'bucketOwnerFullControl' | 'bucketOwnerRead' | 'private' | 'projectPrivate' | 'publicRead'

Apply a predefined set of access controls to the destination object.

dropContextGroupsstring[]

Specifies which object context groups to drop from the source object(s) during a compose operation. The accepted value is 'custom'. Destination contexts behave as follows:

  • When request body contexts are provided, they override all source contexts.
  • When no request body contexts are provided, source contexts are preserved unless 'dropContextGroups' contains 'custom', in which case all contexts are dropped.
ifGenerationMatchstring

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

ifMetagenerationMatchstring

Makes the operation conditional on whether the object's current metageneration matches the given value.

kmsKeyNamestring

Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.

userProjectstring

The project to be billed for this request. Required for Requester Pays buckets.

Request body

deleteSourceObjectsboolean

If true, the source objects will be deleted.

kindstring

The kind of item this is.

Response

Successful response

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/devstorage.read_write was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/devstorage.read_write was removed from the endpoint's security scheme Oauth2c

    • breaking

      removed the request body

    • breaking

      removed the media type */* for the response with the status

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/devstorage.read_write was removed from the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/devstorage.read_write was removed from the endpoint's security scheme Oauth2c