GetObject¶
Downloads the object in the specified path.
If the object’s upload availability is set to streaming
, Tebi DataStream downloads the object even if it is still being uploaded.
You must have Read
ACL to be able to call this action.
The following operations are related to GetObject
:
Request Syntax¶
1GET /<PATH> HTTP/1.1
2Host: <BUCKET>.datastream.tebi.io
3Range: Range
The request uses the following URI parameters:
<BUCKET>: Bucket name containing the object. Required.
<PATH>: Path (including the file name) where the object is stored in storage.
Range: The range within the object (in bytes) to retrieve.
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
andrule-id
key-value pairs providing object expiration information. The value of therule-id
is URL encoded.x-amz-website-redirect-location: If the bucket is configured as a website, this redirects requests for this 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.
Errors¶
AccessDenied: You don’t have access to this object. HTTP Code 403
AccountProblem: There is a problem with your account, contact support to resolve it, please. HTTP Code 403
NoSuchKey: Object not found. HTTP Code 404
ObjectProblem: Object is blocked, contact support to resolve this problem, please. HTTP Code 403
M3U8SegmentTimeout: Can not provide the requested Playlist after blocking for more than three Target Durations. HTTP Code 503
M3U8SegmentIsTooBig: The requested segment is greater than the last Media Segment plus two. HTTP Code 400
X-Amzn-Errortype
response header will contain error code. Error message will be encoded as JSON in the server response body.
Error Example¶
1HTTP/1.1 403 Forbidden
2Content-Length: 28
3Content-Type: application/x-amz-json-1.1
4Server: Caddy
5X-Amz-Id-2: node-de-6
6X-Amz-Request-Id: ds/1665406139.171509/TgM4
7X-Amzn-Errortype: AccessDenied
8Date: Mon, 10 Oct 2022 12:48:59 GMT
9
10{"Message": "Access Denied"}
See Also¶
Refer here for more information.