Object Storage Service

Products

Object Storage Service

Get Object

Description

Operation can retrieve Object from OSS, and you must have READ permission to the Object. If the Object permission is Public and Read, then Object can be retrieved without signature verification.

Note: Data pull assignment via x-amz-customize-back-source-url and x-amz-customize-back-source-param headers is supported; when the object is downloading after assignment, URL data provided by the request header will be pulled and returned to the user.

Request

Syntax

GET /ObjectName HTTP/1.1
Host: <bucket>.s3.<region>.jcloudcs.com 
Date: <date>
Authorization: <authorization string> (see Authenticating Requests (AWS Signature Version4))
Range:bytes=<byte_range>

Request Parameter

No Request Parameters

Request Header

Except sharing request Header, the operation can be implemented by the following request Header with the size not exceeding 8KB.

Name Description Must
Range Specify byte range to download ObjectObject
Type: String
Default: None
Constraints: None
No
If-Modified-Since If Object is modified after specified time, the Object will be returned, otherwise 304 (not modified) will be returned
Type: String
Default: None
Constraints: None
No
If-Unmodified-Since If Object is not modified after specified time, the Object will be returned, otherwise 412 (precondition failed) will be returned.
Type: String
Default: None
Constraints: None
No
If-Match If the ETag is consistent with the specified ETag, the Object will be returned, otherwise 412 (precondition failed) will be returned.
Type: String
Default: None
Constraints: None
No
IF-None-Match If the ETag is inconsistent with the specified ETag, the Object will be returned, otherwise 304 (not modified) will be returned.
Type: String
Default: None
Constraints: None
No
x-amz-customize-back-source-url Back-to-origin address, supporting format such as http://www.example.com:1000/path.
Type: String
Default: None
No
x-amz-customize-back-source-param json character string of base64 code. Set parameters with images back-to-origin.
Type: String
Default: None
No

Note:

  • If both If-Match and If-Unmodified-Since are existed in the request, If-Match is true, and If-Unmodified-Since is false, OSS will return 200 OK
  • If both If-None-Match and If-Modified-Since are existed in the request, If-None-Match is false, and If-Modified-Since is true, OSS will return 403 Not Modified

Response

Response Header

Name Description
x-amz-storage-class Provide storage type information of Object. In the case of non-standard storage, OSS will return the Header
x-amz-restore Restoration information and replica life cycle of the object

Response Element

No Response Element

Examples

Request Example

GET /my-image.jpg HTTP/1.1
Host: oss-example.s3.<region>.jcloudcs.com 
Date: Mon, 3 Oct 2016 22:32:00 GMT
Authorization: <authorization string>

Return Example
HTTP/1.1 200 OK
x-amz-request-id: 318BC8BC148832E5
Date: Mon, 3 Oct 2016 22:32:00 GMT
Last-Modified: Wed, 12 Oct 2009 17:50:00 GMT
ETag: "fba9dede5f27731c9771645a39863328"
Content-Length: 434234

[434234 bytes of object data]
Update Time:2019-07-24 18:45:32