Retrieves object metadata. When alt=media
is included as a query
parameter in the request, this method retrieves object data.
This method supports the use of the Range
header, which can be used to retrieve only part of the object data.
For examples of performing object downloads with different Cloud Storage tools and client libraries, see the Downloading Objects guide .
Request
HTTP request
GET https://storage.googleapis.com/storage/v1/b/ bucket /o/ object
In addition to standard query parameters , the following query parameters apply to this method.
To see an example of how to include query parameters in a request, see the JSON API Overview page.
Parameters
bucket
string
object
string
alt
string
json
. Acceptable values are:
-
json: Return object metadata. -
media: Return object data. Not supported for soft-deleted objects.
generation
long
softDeleted
is true
, this parameter is
required.ifGenerationMatch
long
ifGenerationNotMatch
long
ifMetagenerationMatch
long
ifMetagenerationNotMatch
long
projection
string
noAcl
.Acceptable values are:
-
full: Include all properties. -
noAcl: Omit theowner,aclproperty.
restoreToken
string
restoreToken
is a universally unique identifier (UUID)
associated with each soft-deleted object
. When getting the metadata for a soft-deleted object, the restoreToken
is
only required when the name
and generation
values of the object do not uniquely identify
it
. Otherwise, including a restoreToken
in the request is
optional.
softDeleted
boolean
true
, returns the metadata of the soft-deleted object
.
If true
, generation
must also be specified, and alt=media
cannot be specified.X-Goog-Encryption-Algorithm
string
AES256
. Use this header if the
object is encrypted with a customer-supplied
encryption key
and you want the object's data or content hashes returned in the
response.X-Goog-Encryption-Key
string
X-Goog-Encryption-Key-Sha256
string
Request body
Do not supply a request body with this method.
Response
By default, this responds with an object
resource
in the response body. If you provide the URL parameter alt=media
,
then it will respond with the object data in the response body.
For information about status and error codes returned by this API, see the reference page .
Try it!
Use the APIs Explorer below to call this method on live data and see the response.

