get method
Written by
Returns an object from Object Storage.
Request
GET /{bucket}/{key} HTTP/2
Path parameters
Parameter | Description |
---|---|
bucket |
Bucket name. |
key |
Object key. |
Query parameters
Parameter | Description |
---|---|
response-content-type |
Sets the Content-Type response header. |
response-content-language |
Sets the Content-Language response header. |
response-expires |
Sets the Expires response header. |
response-cache-control |
Sets the Cache-Control response header. |
response-content-disposition |
Sets the Content-Disposition response header. |
response-content-encoding |
Sets the Content-Encoding response header. |
versionId |
Link to a specific version of the object. |
Headers
Use the necessary common request headers in requests.
You can also use the following headers in requests:
Header | Description |
---|---|
Range |
Sets the byte range to be uploaded from the object. For more information about the Range header, see the HTTP specification http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. |
If-Modified-Since |
If specified, Object Storage returns: - Object. If it has been modified since the specified time. - Code 304. If the object hasn't been modified since the specified time. If a request has both the If-Modified-Since and If-None-Match headers and their checks result in If-Modified-Since -> true and If-None-Match -> false , then Object Storage returns a 304 code. For more information, see RFC 7232. |
If-Unmodified-Since |
If specified, Object Storage returns: - Object. If it has not been modified since the specified time. - Code 412. If the object hasn't been modified since the specified time. If a request has both the If-Unmodified-Since and If-Match headers and their checks result in If-Unmodified-Since -> false and If-Match -> true , then Object Storage returns a 200 code and the requested data. For more information, see RFC 7232. |
If-Match |
If specified, Object Storage returns: - Object. If its ETag matches the one sent.- Code 412. If its ETag doesn't match the one sent.If a request has both the If-Unmodified-Since and If-Match headers and their checks result in If-Unmodified-Since -> false and If-Match -> true , then Object Storage returns a 200 code and the requested data. For more information, see RFC 7232. |
If-None-Match |
If specified, Object Storage returns: - Object. If its ETag doesn't match the one sent.- Code 304. If its ETag matches the one sent.If a request has both the If-Modified-Since and If-None-Match headers and their checks result in If-Modified-Since -> true and If-None-Match -> false , then Object Storage returns a 304 code. For more information, see RFC 7232. |
Response
Headers
In addition to common response headers, responses may have headers listed in the table below.
Header | Description |
---|---|
x-amz-meta-* |
User-defined object metadata that is stored with the object. |
x-amz-storage-class |
Object storage class. The value is COLD if the object is stored in cold storage.If it is stored in standard storage, the header is omitted. |
x-amz-server-side-encryption |
Encryption algorithm used to encrypt the object. Returned if the object was loaded with enabled encryption. |
x-amz-server-side-encryption-aws-kms-key-id |
ID of the KMS key. Returned if the object was loaded with enabled encryption. |
Response codes
For a list of possible responses, see Responses.