Stay organized with collections Save and categorize content based on your preferences.
Lists metadata for an object.
If the object does not exist, Cloud Storage returns a 404 Not Found status code.
Query string parameters Parameter Description Requiredgeneration
You can use this if you want to fetch a specific object generation. 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).
NoDate
The date and time of the request. No Host
The URI for Cloud Storage. For more information, see Request Endpoints. Yes If-Match
An entity tag (ETag). If the ETag you specify is the same as the ETag for the object, then the metadata is returned. No If-Modified-Since
A date and time. If the object has been modified later than the date and time you specify, then the metadata is returned. No If-None-Match
An entity tag (ETag). If the ETag you specify is different from the ETag for the object, then the metadata is returned. No If-Unmodified-Since
A date and time. If the object has not been modified later than the date you specify, then the metadata is returned. No Range
Including this header causes the response to contain a Content-Range
header. However, since HEAD Object requests don't contain a response body, the Range
header doesn't otherwise have an effect on the request. No x-goog-if-generation-match
If the generation you specify is the same as the generation for the object, then the metadata is returned. No x-goog-if-metageneration-match
If the metageneration you specify is the same as the metageneration for the object, then the metadata is returned. 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 syntaxHEAD /OBJECT_NAME HTTP/1.1 Host: BUCKET_NAME.storage.googleapis.com Date: DATE Content-Length: 0 Authorization: AUTHENTICATION_STRING Range: bytes=BYTE_RANGE If-Match: ENTITY_TAG If-Modified-Since: DATE If-None-Match: ENTITY_TAG If-Unmodified-Since: DATE
The request can return a variety of response headers depending on the request headers you use, including: Cache-Control, Content-Length, Content-Type, Content-Disposition, ETag, and Last-Modified.
Response body elementsThe response does not include an XML document in the response body. Error responses to HEAD requests also do not contain a response body.
ExampleThe following sample gets metadata for an object named paris.jpg
that's in a bucket named travel-maps
.
Request
HEAD /paris.jpg HTTP/1.1 Host: travel-maps.storage.googleapis.com Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s-6Uw7p8vtgSwg
Response
... expires: Wed, 30 May 2018 21:41:23 GMT date: Wed, 30 May 2018 21:41:23 GMT cache-control: private, max-age=0 last-modified: Wed, 30 May 2018 20:36:34 GMT etag: "2218880ef78838266ecd7d4c1b742a0e" x-goog-generation: 1486161811706000 x-goog-metageneration: 15 x-goog-stored-content-encoding: identity x-goog-stored-content-length: 328 content-type: image/jpg x-goog-hash: crc32c=HBrbzQ== x-goog-hash: md5=OCydg52+pPG1Bwawjsl7DA== x-goog-storage-class: STANDARD accept-ranges: bytes content-length: 328 ...
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