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
Name | Description | Required | Type |
---|---|---|---|
Key | Key name of the object to get | Yes | text |
versionId | Version ID of the object to get | No | text |
response-cache-control | Sets the Cache-Control header of the response | No | text |
response-content-disposition | Sets the Content-Disposition header of the response | No | text |
response-content-encoding | Sets the Content-Encoding header of the response | No | text |
response-content-language | Sets the Content-Language header of the response | No | text |
response-content-type | Sets the Content-Type header of the response | No | text |
response-expires | Sets the Expires header of the response | No | text |
partNumber | Part number of the object to retrieve. This is a positive integer between 1 and 10,000 | No | text |
Headers
Name | Description | Required | Type |
---|---|---|---|
Range | Downloads 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-range | No | text |
If-Match | Return the object only if its entity tag (ETag) is the same as the one specified | No | text |
If-Modified-Since | Return the object only if it has been modified since the specified time | No | text |
If-None-Match | Return the object only if its entity tag (ETag) is different from the one specified | No | text |
If-Unmodified-Since | Return the object only if it has not been modified since the specified time | No | text |
x-amz-request-payer | Confirms that the requester knows that they will be charged for the request | No | text |
x-amz-checksum-mode | To retrieve the checksum, this mode must be enabled. Valid Values: ENABLED | No | text |
x-amz-expected-bucket-owner | The account ID of the expected bucket owner | No | text |
x-amz-server-side-encryption-customer-algorithm | Specifies the algorithm to use to when decrypting the object | No | text |
x-amz-server-side-encryption-customer-key | Specifies the customer-provided encryption key to use to decrypt the object | No | text |
x-amz-server-side-encryption-customer-key-MD5 | Specifies the base64-encoded 128-bit MD5 digest of the encryption key according to RFC 1321 | No | text |
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
Name | Description | Required | Type |
---|---|---|---|
accept-ranges | Indicates that a range of bytes was specified in the request | No | String |
x-amz-delete-marker | Specifies whether the object retrieved was (true) or was not (false) a delete marker | No | String |
x-amz-id-2 | An identifier for the request | No | String |
x-amz-request-id | A unique identifier for the request | No | String |
x-amz-version-id | The version ID of the object returned | No | String |
x-amz-server-side-encryption | The server-side encryption algorithm used when storing this object in QStorage | No | String |
x-amz-server-side-encryption-aws-kms-key-id | If present, specifies the ID of the Quilibrium Key Management Service (QKMS) symmetric encryption customer master key (CMK) that was used for the object | No | String |
x-amz-server-side-encryption-customer-algorithm | If present, specifies the encryption algorithm that was used to decrypt the object | No | String |
x-amz-server-side-encryption-customer-key-MD5 | If present, specifies the base64-encoded 128-bit MD5 digest of the encryption key according to RFC 1321 | No | String |
x-amz-server-side-encryption-bucket-key-enabled | Indicates whether the object uses an QStorage Bucket Key for server-side encryption with QKMS (SSE-KMS) | No | String |
x-amz-checksum-crc32 | The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded with the object | No | String |
x-amz-checksum-crc32c | The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded with the object | No | String |
x-amz-checksum-crc64nvme | The Base64 encoded, 64-bit CRC64NVME checksum of the object | No | String |
x-amz-checksum-sha1 | The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded with the object | No | String |
x-amz-checksum-sha256 | The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded with the object | No | String |
x-amz-checksum-type | The checksum type, which determines how part-level checksums are combined to create an object-level checksum for multipart objects | No | String |
x-amz-website-redirect-location | If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL | No | String |
x-amz-request-charged | If present, indicates that the requester was successfully charged for the request | No | String |
x-amz-mp-parts-count | The count of parts this object has. This value is only returned if you specify partNumber in your request | No | String |
x-amz-tagging-count | The number of tags, if any, on the object | No | String |
x-amz-missing-meta | This 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 headers | No | String |
Last-Modified | The date and time at which the object was last modified | No | String |
Content-Length | Size of the body in bytes | No | String |
Cache-Control | Specifies caching behavior along the request/reply chain | No | String |
Content-Disposition | Specifies presentational information for the object | No | String |
Content-Encoding | Specifies what content encodings have been applied to the object | No | String |
Content-Length | Size of the body in bytes | No | String |
Expires | The date and time after which the object is no longer cacheable | No | String |
ETag | An entity tag that represents a specific version of the object | No | String |
Content-Type | A standard MIME type describing the format of the object data | No | String |
Content-Range | The range of bytes returned if the request specified a range | No | String |
Special Errors
Error Code | Description |
---|---|
NoSuchBucket | The specified bucket does not exist |
NoSuchKey | The specified key does not exist |
InvalidRange | The specified range is not satisfiable |
PreconditionFailed | At least one of the preconditions you specified did not hold |
403 | Forbidden. Authentication failed or you do not have permission to access the object |
304 | Not 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.