Skip to main content

GetObject

Retrieves objects from QStorage.

Description

The GetObject operation retrieves objects from QStorage. To use this operation, you must have s3:GetObject permissions on the object, or be the bucket owner.

note
  • By default, this operation returns the entire object. You can use the Range header to retrieve a portion of the object.

Request Syntax

GET /ObjectKey?versionId=VersionId&response-content-type=application/json HTTP/1.1
Host: BucketName.qstorage.quilibrium.com
Range: bytes=0-1024
If-Match: "7778aef83f66abc1fa1e8477f296d394"
If-None-Match: "7778aef83f66abc1fa1e8477f296d394"
If-Modified-Since: Wed, 01 Mar 2024 12:00:00 GMT
If-Unmodified-Since: Wed, 01 Mar 2024 12:00:00 GMT
x-amz-server-side-encryption-customer-algorithm: AES256
x-amz-server-side-encryption-customer-key: Base64EncodedEncryptionKey
x-amz-server-side-encryption-customer-key-MD5: Base64EncodedMD5
x-amz-request-payer: requester
x-amz-expected-bucket-owner: OwnerAccountId
Values in italics indicate user input and should be replaced with actual values.

This operation does not have a request body.

Request Parameters

URI Parameters

NameDescriptionRequiredType
KeyKey name of the object to getYestext
versionIdVersion ID of the object to getNotext
response-cache-controlSets the Cache-Control header of the responseNotext
response-content-dispositionSets the Content-Disposition header of the responseNotext
response-content-encodingSets the Content-Encoding header of the responseNotext
response-content-languageSets the Content-Language header of the responseNotext
response-content-typeSets the Content-Type header of the responseNotext
response-expiresSets the Expires header of the responseNotext
partNumberPart number of the object to retrieve. This is a positive integer between 1 and 10,000Notext

Headers

NameDescriptionRequiredType
RangeDownloads the specified range bytes of an object. For more information about the HTTP Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-rangeNotext
If-MatchReturn the object only if its entity tag (ETag) is the same as the one specifiedNotext
If-Modified-SinceReturn the object only if it has been modified since the specified timeNotext
If-None-MatchReturn the object only if its entity tag (ETag) is different from the one specifiedNotext
If-Unmodified-SinceReturn the object only if it has not been modified since the specified timeNotext
x-amz-request-payerConfirms that the requester knows that they will be charged for the requestNotext
x-amz-checksum-modeTo retrieve the checksum, this mode must be enabled.

Valid Values: ENABLED
Notext
x-amz-expected-bucket-ownerThe account ID of the expected bucket ownerNotext
x-amz-server-side-encryption-customer-algorithmSpecifies the algorithm to use to when decrypting the objectNotext
x-amz-server-side-encryption-customer-keySpecifies the customer-provided encryption key to use to decrypt the objectNotext
x-amz-server-side-encryption-customer-key-MD5Specifies the base64-encoded 128-bit MD5 digest of the encryption key according to RFC 1321Notext

Examples

Example 1: Get an entire object

GET /hello.txt HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Last-Modified: Wed, 01 Mar 2024 11:00:00 GMT
ETag: "7778aef83f66abc1fa1e8477f296d394"
x-amz-server-side-encryption: AES256
Content-Length: 11
Content-Type: text/plain
Hello World
Values in italics indicate variable response values.

Example 2: Get a portion of an object using the Range header

GET /hello.txt HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
Range: bytes=0-4
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 206
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Last-Modified: Wed, 01 Mar 2024 11:00:00 GMT
ETag: "7778aef83f66abc1fa1e8477f296d394"
Content-Length: 5
Content-Range: bytes 0-4/11
Content-Type: text/plain
x-amz-server-side-encryption: AES256
Hello
Values in italics indicate variable response values.

Example 3: Get an object with specific response headers

GET /hello.txt?response-content-type=application/octet-stream&response-content-disposition=attachment%3B%20filename%3Dhello.txt HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Last-Modified: Wed, 01 Mar 2024 11:00:00 GMT
ETag: "7778aef83f66abc1fa1e8477f296d394"
Content-Length: 11
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=hello.txt
x-amz-server-side-encryption: AES256
Hello World
Values in italics indicate variable response values.

Response Syntax

HTTP/1.1 200 OK
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
x-amz-version-id: VersionId
x-amz-server-side-encryption: ServerSideEncryptionAlgorithm
x-amz-server-side-encryption-aws-kms-key-id: KMSKeyId
x-amz-server-side-encryption-customer-algorithm: CustomerEncryptionAlgorithm
x-amz-server-side-encryption-customer-key-MD5: CustomerKeyMD5
x-amz-server-side-encryption-bucket-key-enabled: true
Last-Modified: ISO8601Date
Content-Length: ContentLength
ETag: EntityTag
Content-Type: ContentType
Content-Range: ContentRange
Object Data
Values in italics indicate variable response values.

Response Elements

Response Headers

NameDescriptionRequiredType
accept-rangesIndicates that a range of bytes was specified in the requestNoString
x-amz-delete-markerSpecifies whether the object retrieved was (true) or was not (false) a delete markerNoString
x-amz-id-2An identifier for the requestNoString
x-amz-request-idA unique identifier for the requestNoString
x-amz-version-idThe version ID of the object returnedNoString
x-amz-server-side-encryptionThe server-side encryption algorithm used when storing this object in QStorageNoString
x-amz-server-side-encryption-aws-kms-key-idIf present, specifies the ID of the Quilibrium Key Management Service (QKMS) symmetric encryption customer master key (CMK) that was used for the objectNoString
x-amz-server-side-encryption-customer-algorithmIf present, specifies the encryption algorithm that was used to decrypt the objectNoString
x-amz-server-side-encryption-customer-key-MD5If present, specifies the base64-encoded 128-bit MD5 digest of the encryption key according to RFC 1321NoString
x-amz-server-side-encryption-bucket-key-enabledIndicates whether the object uses an QStorage Bucket Key for server-side encryption with QKMS (SSE-KMS)NoString
x-amz-checksum-crc32The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded with the objectNoString
x-amz-checksum-crc32cThe Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded with the objectNoString
x-amz-checksum-crc64nvmeThe Base64 encoded, 64-bit CRC64NVME checksum of the objectNoString
x-amz-checksum-sha1The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded with the objectNoString
x-amz-checksum-sha256The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded with the objectNoString
x-amz-checksum-typeThe checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objectsNoString
x-amz-website-redirect-locationIf the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URLNoString
x-amz-request-chargedIf present, indicates that the requester was successfully charged for the requestNoString
x-amz-mp-parts-countThe count of parts this object has. This value is only returned if you specify partNumber in your requestNoString
x-amz-tagging-countThe number of tags, if any, on the objectNoString
x-amz-missing-metaThis is set to the number of metadata entries not returned in the headers that are prefixed with x-amz-meta-. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headersNoString
Last-ModifiedThe date and time at which the object was last modifiedNoString
Content-LengthSize of the body in bytesNoString
Cache-ControlSpecifies caching behavior along the request/reply chainNoString
Content-DispositionSpecifies presentational information for the objectNoString
Content-EncodingSpecifies what content encodings have been applied to the objectNoString
Content-LengthSize of the body in bytesNoString
ExpiresThe date and time after which the object is no longer cacheableNoString
ETagAn entity tag that represents a specific version of the objectNoString
Content-TypeA standard MIME type describing the format of the object dataNoString
Content-RangeThe range of bytes returned if the request specified a rangeNoString

Special Errors

Error CodeDescription
NoSuchBucketThe specified bucket does not exist
NoSuchKeyThe specified key does not exist
InvalidRangeThe specified range is not satisfiable
PreconditionFailedAt least one of the preconditions you specified did not hold
403Forbidden. Authentication failed or you do not have permission to access the object
304Not Modified. The condition specified in If-Modified-Since or If-None-Match headers was not met

Permissions

You must have the s3:GetObject permission.

Try It Out

Test GetObject

Retrieve an object from a bucket.

Coming Soon

This feature is currently under development and will be available soon.