The Cloud Storage XML API uses several standard HTTP headers as well as several extension (custom) HTTP headers. Several of the HTTP methods also support query string parameters. The headers and parameters are described below.
HTTP headers and query string parameters summary
The XML API uses the following standard HTTP headers:
The XML API uses the following extension (custom) HTTP headers:
The XML API uses the following query string parameters:
Standard HTTP headers
Authorization
A request header that contains a string used to authenticate requests.
Valid Values | One of the following:
|
Example | Authorization: Bearer ya29.AHES6ZRVmB7fkLtd1XTmq6mo0S1wqZZi3-Lh_s- ... |
Details |
To create a sample OAuth 2.0 access token for testing, you can use the OAuth 2.0 playground. Note: If your requests are being routed
through a proxy, you may need to check with your network administrator
to ensure that the |
Cache-Control
A request and response header that specifies the cache-control setting.
Valid Values | Any valid cache-control value (see the specification). |
Example | Cache-Control: public, max-age=6000 |
Details | You should specify cache-control only for objects that are accessible to
all anonymous users. To be anonymously accessible, an object's ACL must
grant READ or FULL_CONTROL permission to
AllUsers . If an object is accessible to all anonymous users
and you do not specify a cache-control setting, Cloud Storage
applies a cache-control setting of 3600 seconds. When serving via XML,
Cloud Storage respects the cache-control of the object as set by
its metadata. |
Content-Disposition
A request and response header that specifies presentational information about the data being transmitted.
Valid Values | Any valid content disposition value (see the specification). |
Example | Content-Disposition: attachment; filename=FILENAME |
Details | If you set the Content-Disposition header when uploading an object, it
will be served at download time (and subsequently interpreted by web
browsers and other HTTP clients). A common use for Content-Disposition is
setting it to
attachment;filename=FILENAMEt ,
typically causing the web browser to open a "Save As..." dialog box. |
Content-Encoding
A request and response header that specifies the compression algorithm for an
object. This header is also used for requests that use a V4 signature in
the Authorization
header and upload data in chunks.
Valid Values | Any valid compression algorithm (see the
specification) or aws-chunked |
Example | Content-Encoding: gzip |
Details | Cloud Storage does not compress objects and only decompresses
objects in certain scenarios. If
you use this header to specify a compression type algorithm (for example,
deflate ), Cloud Storage preserves the header as
object metadata, but does not
compress or decompress the object.
If an upload request uses |