Stay organized with collections Save and categorize content based on your preferences.
Deletes an object.
If you make a DELETE request for an object that doesn't exist, you will get a 404 Not Found status code and the body of the error response will contain NoSuchKey
in the Code
element.
generation
You can use this if you want to delete a specific object generation. If this query parameter is used on a versioned bucket and the generation specified is the live version of the object, the version does not become a noncurrent version of the object, but instead is deleted completely. No
See signed URL query string parameters for information on the parameters you include when creating and using signed URLs.
Header Description RequiredAuthorization
The authentication string for the request. Yes Content-Length
The length of the request body without headers (in bytes).
* Not required for requests that use chunked transfer encoding.
Yes*Date
The date and time of the request. Yes Host
The URI for Cloud Storage. For more information, see Request Endpoints. Yes x-goog-if-generation-match
In order for the request to succeed, the value you specify for this header must match the generation of the object you're requesting. If it does not, the request fails with a 412 Precondition Failed
status code. No x-goog-if-metageneration-match
In order for the request to succeed, the value you specify for this header must match the metageneration of the object you're requesting. If it does not, the request fails with a 412 Precondition Failed
status code. No x-goog-user-project
The project to be billed for charges associated with the request. No Request body elements
This request does not include an XML document in the request body.
Request syntaxDELETE /OBJECT_NAME HTTP/1.1 Host: BUCKET_NAME.storage.googleapis.com Date: DATE Content-Length: 0 Authorization: AUTHENTICATION_STRING
The request can return a variety of response headers depending on the request headers you use.
Response body elementsThe response does not include an XML document in the response body.
ExampleThe following sample deletes an object named paris.jpg.
Request
DELETE /paris.jpg HTTP/1.1 Host: travel-maps.storage.googleapis.com Date: Mon, 15 Feb 2010 11:00:00 GMT Content-Length: 0 Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7p8vtgSwg
Response
HTTP/1.1 204 No Content Date: Mon, 15 Feb 2010 11:00:01 GMT
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4