ListObjectsV2
    • PDF

    ListObjectsV2

    • PDF

    Article Summary

    The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

    Overview

    When you send a GET request to your bucket, the bucket returns a list of objects. The number of objects returned at one time is limited to 1000 and returned in random order.
    When storage class operations are not implemented in NCP object storage, the StorageClass returned in the response code is at the default value. There are no headers or payloads used for operations.

    Requests

    Syntax

    GET https://{endpoint}/{bucket-name} # path style
    GET https://{bucket-name}.{endpoint} # virtual host style
    

    Parameter

    ParametersRequirement statusTypeRestrictionsDescription
    prefixNostringLimits the response to object names starting with the prefix.
    delimiterNostringBinds the objects between the prefix and delimiter together.
    encoding-typeNostringIf a Unicode character not supported by XML is used in the object name, you can solve an encoding problem by setting the parameter to url.
    max-keysNostringMin: 0
    Max: 1000
    Limit the number of objects to be displayed in the response
    The default and max value is 1000
    fetch-ownerNobooleantrue, falseThe owner field doesn't exist in the "version 2": method by default
    To return the owner field, set to true
    start-afterNostringSpecify objects from the place where the list should start in the UTF-8 binary order
    continuation-tokenNostringYou can search the following object list with a token

    Examples

    Request examples

    The following is an example of how to request the search of an object in a bucket named apiary.

    GET /apiary?list-type=2 HTTP/1.1
    Content-Type: text/plain
    Host: kr.object.ncloudstorage.com
    X-Amz-Date: 20160822T225156Z
    Authorization: {authorization-string}
    

    Response examples

    HTTP/1.1 200 OK
    Date: Wed, 24 Aug 2016 17:36:24 GMT
    Accept-Ranges: bytes
    x-amz-request-id: 9f39ff2e-55d1-461b-a6f1-2d0b75138861
    Content-Type: application/xml
    Content-Length: 909
    
    <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Name>apiary</Name>
      <Prefix></Prefix>
      <NextContinuationToken>1a8jKPiaWXb4OhJOLGR9KE495oNwIO1KbsTYDLDvtMArEbHtv8h-NKvDagEgx5nJYDx3X4G7r2bDBBMsD9bZN88ECyHcMDZI_HuE-kq5RiM9I_v2ocKx5h7K9QBXV_0NUCWj0EGYwoBOxyJUyhrrbTRN3swqI9xgmavCCZ2IziP8</NextContinuationToken>
      <KeyCount>1000</KeyCount>
      <MaxKeys>1000</MaxKeys>
      <Delimiter></Delimiter>
      <IsTruncated>true</IsTruncated>
      <Contents>
        <Key>drone-bee</Key>
        <LastModified>2016-08-25T17:38:38.549Z</LastModified>
        <ETag>"0cbc6611f5540bd0809a388dc95a615b"</ETag>
        <Size>4</Size>
        <StorageClass>Standard</StorageClass>
      </Contents>
      <Contents>
         <Key>soldier-bee</Key>
        <LastModified>2016-08-25T17:49:06.006Z</LastModified>
        <ETag>"37d4c94839ee181a2224d6242176c4b5"</ETag>
        <Size>11</Size>
        <StorageClass>Standard</StorageClass>
      </Contents>
      <Contents>
        <Key>worker-bee</Key> 
        <LastModified>2016-08-25T17:46:53.288Z</LastModified>
        <ETag>"d34d8aada2996fc42e6948b926513907"</ETag>
        <Size>467</Size>
        <StorageClass>Standard</StorageClass>
      </Contents>
    </ListBucketResult>
    

    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.