GetObject
    • PDF

    GetObject

    • PDF

    Article Summary

    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

    NameInTypeDescription
    project_idpathstringProject ID
    containerpathstringContainer (bucket) name
    objectpathstringObject name
    X-Auth-Token (Optional)headerstringToken
    X-Newest (Optional)headerbooleanIf 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_sigquerystringTemporary URL
    temp_url_expiresqueryintegerTemporary URL
    filename (Optional)querystringTemporary URL
    multipart-manifest (Optional)querystringIf 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)headerstringRange 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)headerstringETag conditional header. For more information, refer to RFC2616
    If-None-Match (Optional)headerstringETag conditional header. For more information, refer to RFC2616
    If-Modified-Since (Optional)headerstringLast-Modified conditional header. For more information, refer to RFC2616
    If-Unmodified-Since (Optional)headerstringLast-Modified conditional header. For more information, refer to RFC2616

    Response

    NameInTypeDescription
    Content-LengthheaderstringLength of the response result (in bytes)
    Content-TypeheaderstringMIME type of the response result
    X-Object-Meta-name (Optional)headerstringObject metadata. The name part in the header name functions as a key of the metadata.
    Content-Disposition (Optional)headerstringRedefines browser behaviors.
    Content-Encoding (Optional)headerstringEncoding type of the object
    X-Delete-At (Optional)headerintegerThe time at which to delete the object (in Unix Epoch timestamp)
    Accept-RangesheaderstringRange type allowed by the object
    X-Object-Manifest (Optional)headerstringLarge object (DLO) manifest in the form of {container}/{prefix}
    Last-ModifiedheaderstringThe latest time when the object was updated (in UTC)
    ETagheaderstringETag header value
    X-TimestampheaderintegerThe time when the object was first created (in UNIX Time)
    X-Trans-IdheaderstringTransaction ID of the request
    X-Openstack-Request-IdheaderstringTransaction ID of the request (same as X-Trans-Id)
    DateheaderstringResponse time of the request (in UTC)
    X-Static-Large-ObjectheaderbooleanIndicates 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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.