ListObjectsV2
- Print
- PDF
ListObjectsV2
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
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
Parameters | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
prefix | No | string | Limits the response to object names starting with the prefix. | |
delimiter | No | string | Binds the objects between the prefix and delimiter together. | |
encoding-type | No | string | If 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-keys | No | string | Min: 0 Max: 1000 | Limit the number of objects to be displayed in the response The default and max value is 1000 |
fetch-owner | No | boolean | true, false | The owner field doesn't exist in the "version 2": method by default To return the owner field, set to true |
start-after | No | string | Specify objects from the place where the list should start in the UTF-8 binary order | |
continuation-token | No | string | You 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?