GetObject
- Print
- PDF
GetObject
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Downloads an object and gets its metadata.
The API request returns object metadata in the response header, and object contents in the response body. For a large object, the response body contains connection information of segment objects. To get the manifest of a static large object, use the multipart-manifest parameter.
Syntax
GET /v1/AUTH_{project_id}/{container}/{object}
Request
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID |
container | path | string | Container (bucket) name |
object | path | string | Object name |
X-Auth-Token (Optional) | header | string | Token |
X-Newest (Optional) | header | boolean | If it is true, the API request queries all copies and responds with the information of the latest copy. If this header is not specified, the API request returns the information that it can respond most quickly with. |
temp_url_sig | query | string | Temporary URL |
temp_url_expires | query | integer | Temporary URL |
filename (Optional) | query | string | Temporary URL |
multipart-manifest (Optional) | query | string | If the object is a large object (X-Static-Large-Object: True) and the parameter is set to true, the API request responds with connection information of segment objects. |
Range (Optional) | header | string | Range of the object to get. Range: Bytes=-5 (Last 5 Bytes) Range: Bytes=-6 (From 6 Bytes) Range: Bytes=10-15 (From 10 Bytes to 6 Bytes) Range: Bytes=10-15, -5 (From 10 Bytes to 6 Bytes, last 5 Bytes, Content-Type is multipart/byteranges) |
If-Match (Optional) | header | string | ETag conditional header. For more information, refer to RFC2616 |
If-None-Match (Optional) | header | string | ETag conditional header. For more information, refer to RFC2616 |
If-Modified-Since (Optional) | header | string | Last-Modified conditional header. For more information, refer to RFC2616 |
If-Unmodified-Since (Optional) | header | string | Last-Modified conditional header. For more information, refer to RFC2616 |
Response
Name | In | Type | Description |
---|---|---|---|
Content-Length | header | string | Length of the response result (in bytes) |
Content-Type | header | string | MIME type of the response result |
X-Object-Meta-name (Optional) | header | string | Object metadata. The name part in the header name functions as a key of the metadata. |
Content-Disposition (Optional) | header | string | Redefines browser behaviors. |
Content-Encoding (Optional) | header | string | Encoding type of the object |
X-Delete-At (Optional) | header | integer | The time at which to delete the object (in Unix Epoch timestamp) |
Accept-Ranges | header | string | Range type allowed by the object |
X-Object-Manifest (Optional) | header | string | Large object (DLO) manifest in the form of {container}/{prefix} |
Last-Modified | header | string | The latest time when the object was updated (in UTC) |
ETag | header | string | ETag header value |
X-Timestamp | header | integer | The time when the object was first created (in UNIX Time) |
X-Trans-Id | header | string | Transaction ID of the request |
X-Openstack-Request-Id | header | string | Transaction ID of the request (same as X-Trans-Id) |
Date | header | string | Response time of the request (in UTC) |
X-Static-Large-Object | header | boolean | Indicates whether it is a large object (SLO). |
Examples
Request example
curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
Response example
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
It returns OK (200) status code if successful.
It returns Partial Content (206) status code if the request for part of the object is successful, using the Range parameter, and Not Found (400) status code if the object does not exist.
Was this article helpful?