Google Cloud Platform
Cloud Storage

Objects: delete

Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.

The authenticated user must have WRITER permissions on the bucket.

Request

HTTP request

DELETE https://www.googleapis.com/storage/v1/b/bucket/o/object

Parameters

Parameter name Value Description
Path parameters
bucket string Name of the bucket in which the object resides.
object string Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
Optional query parameters
generation long If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).
ifGenerationMatch long Makes the operation conditional on whether the object's current generation matches the given value.
ifGenerationNotMatch long Makes the operation conditional on whether the object's current generation does not match the given value.
ifMetagenerationMatch long Makes the operation conditional on whether the object's current metageneration matches the given value.
ifMetagenerationNotMatch long Makes the operation conditional on whether the object's current metageneration does not match the given value.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.