GetObject

Retrieves objects from Tebi object storage.

If you set object ACL to public, you can return the object without using an authorization header.

If you encrypt an object using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Tebi, you must use the following headers when you GET the object:

  • x-amz-server-side-encryption-customer-algorithm

  • x-amz-server-side-encryption-customer-key

  • x-amz-server-side-encryption-customer-key-MD5

For more information about SSE-C, see Server-Side Encryption.

Overriding Response Header Values

There are times when you want to override certain response header values in a GET response. For example, you might override the Content-Disposition response header value in your GET request.

You can override values for a set of response headers using query parameters. These response header values are only sent on a successful request when status code 200 OK is returned. The set of headers you can override using these parameters is a subset of the headers that Tebi accepts when you create an object.

The response headers that you can override for the GET response are Content-Type, Content-Language, Expires, Cache-Control, Content-Disposition, and Content-Encoding. To override these header values in the GET response, use the following request parameters:

  • response-content-type

  • response-content-language

  • response-expires

  • response-cache-control

  • response-content-disposition

  • response-content-encoding

Note

You must sign the request either using an Authorization header or a presigned URL when using these parameters. They cannot be used with an unsigned (anonymous) request.

You must have Read ACL to be able to call this action.

The following operations are related to GetObject:

Request Syntax

1GET /<KEY>?partNumber=PartNumber&response-cache-control=ResponseCacheControl&response-content-disposition=ResponseContentDisposition&response-content-encoding=ResponseContentEncoding&response-content-language=ResponseContentLanguage&response-content-type=ResponseContentType&response-expires=ResponseExpires&versionId=VersionId HTTP/1.1
2Host: <BUCKET>.s3.tebi.io
3Range: Range
4If-Modified-Since: IfModifiedSince
5If-None-Match: IfNoneMatch
6x-amz-server-side-encryption-customer-algorithm: SSECustomerAlgorithm
7x-amz-server-side-encryption-customer-key: SSECustomerKey
8x-amz-server-side-encryption-customer-key-MD5: SSECustomerKeyMD5

The request uses the following URI parameters:

  • <BUCKET>: Bucket name containing the object. Required.

  • <KEY>: Key of the object to get. Required.

  • response-cache-control: Sets the Cache-Control header of the response.

  • response-content-disposition: Sets the Content-Disposition header of the response.

  • response-content-encoding: Sets the Content-Encoding header of the response.

  • response-content-language: Sets the Content-Language header of the response.

  • response-content-type: Sets the Content-Type header of the response.

  • response-expires: Sets the Expires header of the response.

  • Range: Downloads the specified range(s) (in bytes) of an object.

  • If-Modified-Since: Returns the object only if it has been modified since the specified time, otherwise returns a 304 (not modified).

  • If-None-Match: Returns the object only if its entity tag (ETag) is different from the one specified, otherwise returns a 304 (not modified).

  • x-amz-server-side-encryption-customer-algorithm: Specifies the algorithm to use to when decrypting the object (for example, AES256).

  • x-amz-server-side-encryption-customer-key: Specifies the customer-provided encryption key for Tebi, which is used to encrypt the data. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header.

  • x-amz-server-side-encryption-customer-key-MD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Tebi uses this header for a message integrity check to ensure that the encryption key was transmitted without error.

The request does not have a request body.

Response Syntax

 1HTTP/1.1 200
 2Accept-Ranges: AcceptRanges
 3Last-Modified: LastModified
 4Content-Length: ContentLength
 5Cache-Control: CacheControl
 6Content-Disposition: ContentDisposition
 7Content-Encoding: ContentEncoding
 8Content-Language: ContentLanguage
 9Content-Range: ContentRange
10Content-Type: ContentType
11Expires: Expires
12ETag: ETag
13x-amz-expiration: Expiration
14x-amz-website-redirect-location: WebsiteRedirectLocation
15x-amz-server-side-encryption: ServerSideEncryption
16x-amz-server-side-encryption-customer-algorithm: SSECustomerAlgorithm
17x-amz-server-side-encryption-customer-key-MD5: SSECustomerKeyMD5
18x-amz-storage-class: StorageClass
19
20Body

If the action is successful, the service sends back an HTTP 200 or 206 response.

The response returns the following HTTP headers:

  • Accept-Ranges: Indicates that a range of bytes was specified.

  • Last-Modified: Creation date of the object.

  • Content-Length: Size of the body in bytes.

  • Cache-Control: Specifies caching behavior along the request/reply chain.

  • Content-Disposition: Specifies presentational information for the object.

  • Content-Encoding: Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.

  • Content-Language: Language the content is in.

  • Content-Range: Portion of the object returned in the response.

  • Content-Type: Standard MIME type describing the format of the object data.

  • Expires: Date and time at which the object is no longer cacheable.

  • ETag: Opaque identifier assigned by a web server to a specific version of a resource found at a URL.

  • x-amz-expiration: If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded.

  • x-amz-website-redirect-location: If the bucket is configured as a website, this redirects requests for the object to another object in the same bucket, or to an external URL. Tebi stores the value of this header in the object metadata.

  • x-amz-server-side-encryption: Server-side encryption algorithm used when storing this object in Tebi (AES256).

  • x-amz-server-side-encryption-customer-algorithm: If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.

  • x-amz-server-side-encryption-customer-key-MD5: If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.

  • x-amz-storage-class: User-defined storage class. Tebi returns this header for all objects except for STANDARD storage class objects. For more information see Storage Classes Overview.

Body data is returned in binary format by the service.

See Also

Refer here for more information.