GetObject

Prev Next

Available in Classic and VPC

Download objects from a container (bucket) and view their metadata.
Check the object metadata in the response header and download the object contents in the response body.
For large objects, the response body contains the associated content of segmented objects.

Requests

The following describes the request format for the endpoint. The request format is as follows.

Method URI
GET /v1/AUTH_{project_id}/{container}/{object}

Request headers

The following describes the headers.

Field Type Required Description
X-Auth-Token String Optional Value of the issued token
X-Newest Boolean Optional Set whether to respond with information from the most recent replica
  • true | false
    • true: Query all replicas and respond with information from the most recent replica
  • If the header is omitted, respond with the fastest information available
Range String Optional Specify the range of the target object
  • Bytes=-5: last 5 bytes
  • Bytes=10-15: 6 bytes from byte 10 through byte 15
  • Bytes=10-15,-5: Respond with 6 bytes from 10 to 15 and the last 5 bytes together; respond with Content-Type header as multipart/byteranges
  • Bytes=6-: 6 bytes to the end
  • Bytes=1-3,2-5: Respond with 3 bytes from byte 1 through 3 and 3 bytes from byte 2 through 5 together; respond with Content-Type header as multipart/byteranges
If-Match String Optional ETag condition header
If-None-Match String Optional ETag condition header
If-Modified-Since String Optional Last-Modified condition header
If-Unmodified-Since String Optional Last-Modified condition header

Request path parameters

The following describes the request path parameters.

Field Type Required Description
project_id String Required Project ID
container String Required Name of the container (bucket)
object String Required Object name

Request query parameters

The following describes the parameters.

Field Type Required Description
temp_url_sig String Required Signature of a temporary URL to access the resource to be stored
  • Validate that the request is authorized
temp_url_expires Integer Required Expiration time for the temporary URL to access the resource to be stored (Unix timestamp)
filename String Conditional Location and file name to save the object
multipart-manifest String Conditional Declare a multipart upload of a large object
  • Use to import a manifest for a static large object
  • Entering put as a value is recognized as a multipart upload and tells the server to assemble the parts into a single file
  • Must create a manifest for the part combination in the request body

Request example

The following is a sample request.

curl -X GET "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}" 
-H "X-Auth-Token: $token"

Responses

The following describes the response format.

Response headers

The following describes the headers.

Field Type Required Description
Content-Type String - MIME type of the response result
ETag String - ETag header value
Last-Modified String - Most recent modification time of the object (UTC)
X-Timestamp Integer - Creation time of the object (Unix timestamp)
Accept-Ranges String - Range types allowed by the object
Content-Length String - Length of the response result (bytes)
X-Trans-Id String - Transaction ID of the request
X-Openstack-Request-Id String - Transaction ID of the request
  • Identical to X-Trans-Id
X-Object-Meta-{name} String - Metadata to set
  • Enter the key for the metadata in the {name} part
  • Enter the metadata value in the header value
Content-Disposition String - Browser's response handling method
Content-Encoding String - Object's encoding method
X-Delete-At Integer - Scheduled time for automatic deletion of the object (Unix timestamp)
  • Use when you want to temporarily store data
  • It deletes the object at the entered date and time
X-Object-Manifest String - When uploading large objects, the manifest of the object (SLO)
  • Format: {container}/{prefix}
Date String - Response time of the request (UTC)
X-Static-Large-Object Boolean - Whether it's a large object (SLO)
  • true | false

Response status codes

The following describes the response status codes.

HTTP status code Code Message Description
200 - OK Request succeeded
206 - Partial Content Successful request for partial object contents via Range parameter
403 - Not Found Container (bucket) doesn't exist

Response example

The following is a sample response.

HTTP/1.1 200 OK
Content-Length: 210012
Accept-Ranges: bytes
Last-Modified: Tue, 11 Sep 2018 02:12:30 GMT
Etag: 9bd5b4f25faf491080654a34d57c3636
X-Timestamp: 1536631949.99141
Content-Type: text/plain
X-Trans-Id: tx9b5c78b06d0f41c5bd4bf-005b989fb7
X-Openstack-Request-Id: tx9b5c78b06d0f41c5bd4bf-005b989fb7
Date: Wed, 12 Sep 2018 05:10:15 GMT