doc-exports/docs/obs/s3api/en-us_topic_0125560237.html
Jawei, Li 1a4c1a720a OBS s3api 2.0.38.SP5
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Jawei, Li <lijiawei5@huawei.com>
Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
2022-11-16 14:51:13 +00:00

414 lines
32 KiB
HTML

<a name="EN-US_TOPIC_0125560237"></a><a name="EN-US_TOPIC_0125560237"></a>
<h1 class="topictitle1">GET Bucket (List Objects)</h1>
<div id="body55213349"><p class="msonormal" id="EN-US_TOPIC_0125560237__p43960067">After being granted the <strong id="EN-US_TOPIC_0125560237__b27158099">READ</strong> permission for a bucket, you can use this operation to obtain the list of objects in this bucket.</p>
<p class="msonormal" id="EN-US_TOPIC_0125560237__p164194198910">If you specify only the bucket name in the <strong id="EN-US_TOPIC_0125560237__b1127642116586">GET Bucket</strong> request, OBS returns descriptions for some or all objects (a maximum of 1000 objects) in the bucket.</p>
<p class="msonormal" id="EN-US_TOPIC_0125560237__p13340162711586">If you also specify one or more parameters among <strong id="EN-US_TOPIC_0125560237__b52322376">prefix</strong>, <strong id="EN-US_TOPIC_0125560237__b1139337">marker</strong>, <strong id="EN-US_TOPIC_0125560237__b10254041">max-keys</strong>, and <strong id="EN-US_TOPIC_0125560237__b25177512">delimiter</strong> in the request, OBS returns a list of objects as specified. <a href="#EN-US_TOPIC_0125560237__table14681180">Table 1</a> describes the parameters in this request.</p>
<p id="EN-US_TOPIC_0125560237__p11805547174518">When the number of listed objects exceeds the default upper limit 1000 or the specified <strong id="EN-US_TOPIC_0125560237__b06731405467">max-keys</strong> value, the <strong id="EN-US_TOPIC_0125560237__b108610614610">NextMarker</strong> field is displayed in the response message, indicating the last object to be listed in the request. For subsequent requests, you can set the <strong id="EN-US_TOPIC_0125560237__b8139102594619">marker</strong> to the value of <strong id="EN-US_TOPIC_0125560237__b3801152854618">NextMarker</strong> returned last time, and list subsequent objects.</p>
<div class="section" id="EN-US_TOPIC_0125560237__section14380054"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen2744074711718">GET /?prefix=p&amp;delimiter=d HTTP/1.1
User-Agent: agent
Host: bucketname.obs.example.com
Accept: */*
Date: date
Authorization: authorization</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section62311629"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0125560237__p21217075">You can specify parameters in this request to list desired objects in a bucket. <a href="#EN-US_TOPIC_0125560237__table14681180">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560237__table14681180"></a><a name="table14681180"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560237__table14681180" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0125560237__row12739091"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.3.2.4.1.1"><p id="EN-US_TOPIC_0125560237__p25233452">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.3.2.4.1.2"><p id="EN-US_TOPIC_0125560237__p30643766">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.3.2.4.1.3"><p id="EN-US_TOPIC_0125560237__p66226009">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560237__row62706492"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560237__p46061063">prefix</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560237__p39958627">Limits the response to object keys that begin with the specified prefix.</p>
<p id="EN-US_TOPIC_0125560237__p24083327">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560237__p4592438">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row41331948"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560237__p59553514">marker</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560237__p59105304">Indicates the object key to start with when listing objects in a bucket. All objects are listed in the dictionary order.</p>
<p id="EN-US_TOPIC_0125560237__p62185688">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560237__p3875986">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row34883877"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560237__p7021780">max-keys</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560237__p31893332">Sets the maximum number of object keys returned in the response body. The value ranges from 1 to 1000. If the value is not in this range, 1000 is returned by default.</p>
<p id="EN-US_TOPIC_0125560237__p18604538">Type: Integer</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560237__p30572598">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row6717926"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560237__p7281095">delimiter</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560237__p52897817">Indicates a character or a sequence of characters used to group object keys.</p>
<p id="EN-US_TOPIC_0125560237__p6318307">All object keys that contain the same string between the prefix, if specified, and the first occurrence of delimiter after the prefix are grouped under a single result element, <strong id="EN-US_TOPIC_0125560237__b56864771">CommonPrefixes</strong>.</p>
<p id="EN-US_TOPIC_0125560237__p42020897">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560237__p48249507">Optional</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section23933749"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560237__p8846437">This request uses common headers. For details about common request headers, see section <a href="en-us_topic_0125560462.html">Common Request Headers</a>.</p>
<p id="EN-US_TOPIC_0125560237__p6602325">If you want to obtain CORS configuration information, you must use the headers in <a href="#EN-US_TOPIC_0125560237__table26112624">Table 2</a>.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560237__table26112624"></a><a name="table26112624"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560237__table26112624" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request headers of CORS configuration</caption><thead align="left"><tr id="EN-US_TOPIC_0125560237__row50125655"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.7.4.2.4.1.1"><p id="EN-US_TOPIC_0125560237__p33646287">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.7.4.2.4.1.2"><p id="EN-US_TOPIC_0125560237__p40994711">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.7.4.2.4.1.3"><p id="EN-US_TOPIC_0125560237__p32237271">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560237__row61082168"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.1 "><p id="EN-US_TOPIC_0125560237__p48708577">Origin</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.2 "><p id="EN-US_TOPIC_0125560237__p53080699">Indicates an origin specified by a pre-request. Generally, it is a domain name.</p>
<p id="EN-US_TOPIC_0125560237__p7964250">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.3 "><p id="EN-US_TOPIC_0125560237__p41124512">Mandatory</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row34576289"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.1 "><p id="EN-US_TOPIC_0125560237__p49215996">Access-Control-Request-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.2 "><p id="EN-US_TOPIC_0125560237__p27072744">Indicates the HTTP headers of a request. The request can use multiple HTTP headers.</p>
<p id="EN-US_TOPIC_0125560237__p42328108">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.3 "><p id="EN-US_TOPIC_0125560237__p6024691">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row1674252311610"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.1 "><p id="EN-US_TOPIC_0125560237__p118132513166">x-amz-security-token</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.2 "><p id="EN-US_TOPIC_0125560237__p41832511161">Header field used to identify the request of a federated user. When the federal authentication function is enabled, users sending such requests are identified as federated users.</p>
<p id="EN-US_TOPIC_0125560237__p818172513166">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.7.4.2.4.1.3 "><p id="EN-US_TOPIC_0125560237__p5181725171616">Optional. This parameter must be carried in the request sent by federated users.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section14077152"><h4 class="sectiontitle">Request Elements</h4><p id="EN-US_TOPIC_0125560237__p29924127">This request involves no elements.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section55470411"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen1483776311829">HTTP/1.1 status_code
Server: Server Name
x-amz-request-id: request id
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
x-amz-bucket-region: region name
x-amz-id-2: id
Content-Type: type
Date: date
Content-Length: length
&lt;Response Body&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section29471659"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560237__p4098511311838">This response uses common headers. For details about common response headers, see section <a href="en-us_topic_0125560484.html">Common Response Headers</a>.</p>
<p id="EN-US_TOPIC_0125560237__p64505759">In addition to common headers, when CORS is configured for buckets, you can use the response headers in <a href="#EN-US_TOPIC_0125560237__table881688">Table 3</a>.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560237__table881688"></a><a name="table881688"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560237__table881688" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Appended response headers</caption><thead align="left"><tr id="EN-US_TOPIC_0125560237__row53632486"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.10.4.2.3.1.1"><p id="EN-US_TOPIC_0125560237__p49264104">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.10.4.2.3.1.2"><p id="EN-US_TOPIC_0125560237__p30969474">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560237__row25499485"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p52192417">Access-Control-Allow-Origin</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p66836212">If <strong id="EN-US_TOPIC_0125560237__b64655004">Origin</strong> in the request meets the CORS configuration requirements, <strong id="EN-US_TOPIC_0125560237__b45024129">Origin</strong> is included in the response.</p>
<p id="EN-US_TOPIC_0125560237__p2563980">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row23075822"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p57202275">Access-Control-Allow-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p2872713">CORS is configured for buckets. If <strong id="EN-US_TOPIC_0125560237__b25854422">headers</strong> in the request meet the CORS configuration requirements, <strong id="EN-US_TOPIC_0125560237__b31363207">headers</strong> are included in the response.</p>
<p id="EN-US_TOPIC_0125560237__p13833415">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row57391878"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p18230574">Access-Control-Max-Age</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p281510">Indicates <strong id="EN-US_TOPIC_0125560237__b2533591">MaxAgeSeconds</strong> in the CORS configuration of a server.</p>
<p id="EN-US_TOPIC_0125560237__p22802326">Type: Integer</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row3894347"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p47006691">Access-Control-Allow-Methods</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p49445640">If <strong id="EN-US_TOPIC_0125560237__b42357578">Access-Control-Request-Method</strong> in the request meets the CORS configuration requirements, methods in the rule are included in the response.</p>
<p id="EN-US_TOPIC_0125560237__p45673889">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p8411821">Valid values: <strong id="EN-US_TOPIC_0125560237__b8597527">GET</strong>, <strong id="EN-US_TOPIC_0125560237__b10268880">PUT</strong>, <strong id="EN-US_TOPIC_0125560237__b25311057">HEAD</strong>, <strong id="EN-US_TOPIC_0125560237__b26472923">POST</strong>, and <strong id="EN-US_TOPIC_0125560237__b36929719">DELETE</strong></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row63932023"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p11111371">Access-Control-Expose-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p27605888">Indicates <strong id="EN-US_TOPIC_0125560237__b1028412284583">ExposeHeader</strong> in the CORS configuration of a server.</p>
<p id="EN-US_TOPIC_0125560237__p21484478">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row10074419569"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p22811237152020">x-amz-bucket-region</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.10.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p84051542131913">Indicates the region of the bucket.</p>
<p id="EN-US_TOPIC_0125560237__p184051742181910">Type: String</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0125560237__p59142575"></p>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section63918341"><h4 class="sectiontitle">Response Elements</h4><p id="EN-US_TOPIC_0125560237__p25819276">This response contains the XML list of the objects in a bucket. <a href="#EN-US_TOPIC_0125560237__table51351348142023">Table 4</a> describes the elements in the XML list.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560237__table51351348142023"></a><a name="table51351348142023"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560237__table51351348142023" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response elements</caption><thead align="left"><tr id="EN-US_TOPIC_0125560237__row6230702"><th align="left" class="cellrowborder" valign="top" width="30.45%" id="mcps1.3.11.3.2.3.1.1"><p id="EN-US_TOPIC_0125560237__p34924842">Element</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="69.55%" id="mcps1.3.11.3.2.3.1.2"><p id="EN-US_TOPIC_0125560237__p10339914">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560237__row32226678"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p60224151">ListBucketResult</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p46318101">A list of objects in a bucket</p>
<p id="EN-US_TOPIC_0125560237__p14209730">Type: XML</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row60778711"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p24128582">Contents</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p8258121">Metadata of the objects</p>
<p id="EN-US_TOPIC_0125560237__p7214230">Type: XML</p>
<p id="EN-US_TOPIC_0125560237__p64928073">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row47481747"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p20816280">CommonPrefixes</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p8397134">Grouping information. If you specify a delimiter in the request, the response contains grouping information in <strong id="EN-US_TOPIC_0125560237__b8465347">CommonPrefixes</strong>.</p>
<p id="EN-US_TOPIC_0125560237__p9079260">Type: XML</p>
<p id="EN-US_TOPIC_0125560237__p14604484">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row64331499"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p43468963">Delimiter</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p31325099">The <strong id="EN-US_TOPIC_0125560237__b13490436">delimiter</strong> parameter specified in a request</p>
<p id="EN-US_TOPIC_0125560237__p54305067">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p18983560">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row36634316"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p14589621">DisplayName</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p40908687">Name of an object owner</p>
<p id="EN-US_TOPIC_0125560237__p32633870">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p25269378">Parent node: ListBucketResult.Contents.Owner</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row26097812"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p33547998">ETag</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p12714465165016">The MD5 value of an object. (If an object is encrypted using server-side encryption, the ETag value is not the MD5 value of the object.)</p>
<p id="EN-US_TOPIC_0125560237__p28864252">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p58451680">Parent node: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row56303072"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p64255013">ID</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p37273587">DomainId of an object owner</p>
<p id="EN-US_TOPIC_0125560237__p67026828">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p66370545">Parent node: ListBucketResult.Contents.Owner</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row60463993"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p65745283">IsTruncated</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p23767697">Determines whether the returned list is truncated. <strong id="EN-US_TOPIC_0125560237__b12582685">true</strong> indicates that the result is incomplete while <strong id="EN-US_TOPIC_0125560237__b46135308">false</strong> indicates that the result is complete.</p>
<p id="EN-US_TOPIC_0125560237__p12564589">Type: Boolean</p>
<p id="EN-US_TOPIC_0125560237__p45972443">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row11098806"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p26588063">Key</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p6149456">Name of an object</p>
<p id="EN-US_TOPIC_0125560237__p55345107">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p28343922">Parent node: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row53768708"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p60298130">LastModified</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p52310372">Date and time when the last modification was made to an object</p>
<p id="EN-US_TOPIC_0125560237__p1031307">Type: Date</p>
<p id="EN-US_TOPIC_0125560237__p9281763">Parent node: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row16427006"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p55519147">Marker</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p757048">Start point for listing objects</p>
<p id="EN-US_TOPIC_0125560237__p6813434">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p61320909">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row15017275"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p8439728">NextMarker</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p12529345">A marker for the last returned object in the list. <strong id="EN-US_TOPIC_0125560237__b45655248">NextMarker</strong> is returned when not all the objects are listed. You can set the <strong id="EN-US_TOPIC_0125560237__b8244056">Marker</strong> value to list the remaining objects in follow-up requests.</p>
<p id="EN-US_TOPIC_0125560237__p7087640">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p63788762">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row37227952"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p62674112">MaxKeys</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p43438321">The maximum objects returned.</p>
<p id="EN-US_TOPIC_0125560237__p55400573">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p28843114">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row58261442"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p21556347">Name</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p1233681">Name of the requested bucket</p>
<p id="EN-US_TOPIC_0125560237__p11103130">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p32819307">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row26938309"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p34519425">Owner</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p44610037">User information, including the DomainId and name</p>
<p id="EN-US_TOPIC_0125560237__p65946020">Type: XML</p>
<p id="EN-US_TOPIC_0125560237__p56643274">Parent node: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row40027424"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p20995945">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p22949990">Prefix of an object key. Only objects whose keys have this prefix are listed.</p>
<p id="EN-US_TOPIC_0125560237__p5223324">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p47009920">Parent node: ListBucketResult</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row20436099"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p44711314">Size</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p64846706">Number of bytes of an object</p>
<p id="EN-US_TOPIC_0125560237__p46749448">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p18091851">Parent node: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560237__row28608932"><td class="cellrowborder" valign="top" width="30.45%" headers="mcps1.3.11.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560237__p35622116">StorageClass</p>
</td>
<td class="cellrowborder" valign="top" width="69.55%" headers="mcps1.3.11.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560237__p66819120">Storage class of an object</p>
<p id="EN-US_TOPIC_0125560237__p64501175">Type: String</p>
<p id="EN-US_TOPIC_0125560237__p383909911665">Values: STANDARD | STANDARD_IA |GLACIER</p>
<p id="EN-US_TOPIC_0125560237__p57212673">Parent node: ListBucketResult.Contents</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section38394164"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560237__p33434609">No special error responses are returned. For details about error responses, see <a href="en-us_topic_0125560440.html#EN-US_TOPIC_0125560440__table30733758">Table 1</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section14854840"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen2122032311913">GET / HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Sun, 26 Sep 2010 09:16:00 GMT
Authorization: AWS 04RZT432N80TGDF2Y2G2:QaTwEcRs5E4p/uahBMYHB+dY00k= </pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section66584700"><h4 class="sectiontitle">Sample Response</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen3454388411932">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: 367CB63A2F283044981285492719060
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
x-amz-bucket-region: R1
x-amz-id-2: MzY3Q0I2M0EyRjI4MzA0NDk4MTI4NTQ5MjcxOTA2MEFBQUFBQUFBYmJiYmJiYmJD
Content-Type: application/xml
Date: Sun, 26 Sep 2010 09:18:36 GMT
Content-Length: 560
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;ListBucketResult xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Name&gt;example&lt;/Name&gt;
&lt;Prefix&gt;&lt;/Prefix&gt;
&lt;Marker&gt;&lt;/Marker&gt;
&lt;MaxKeys&gt;1000&lt;/MaxKeys&gt;
&lt;IsTruncated&gt;false&lt;/IsTruncated&gt;
&lt;Contents&gt;
&lt;Key&gt;test&lt;/Key&gt;
&lt;LastModified&gt;2013-01-15T05:52:15.920Z&lt;/LastModified&gt;
&lt;ETag&gt;0f64741bf7cb1089e988e4585d0d3434&lt;/ETag&gt;
&lt;Size&gt;11&lt;/Size&gt;
&lt;Owner&gt;
&lt;ID&gt;bcaf1ffd86f41caff1a493dc2ad8c2c281e37522a640e161ca5fb16fd081034f&lt;/ID&gt;
&lt;DisplayName&gt;apple&lt;/DisplayName&gt;
&lt;/Owner&gt;
&lt;StorageClass&gt;STANDARD&lt;/StorageClass&gt;
&lt;/Contents&gt;
&lt;/ListBucketResult&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section24651644"><h4 class="sectiontitle">Sample Request (Example of listing objects in a bucket by specifying prefix)</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen36642394111748">GET /?prefix=photos/2006/&amp;delimiter=/ HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Sun, 26 Sep 2010 09:18:36 GMT
Authorization: AWS 04RZT432N80TGDF2Y2G2:QaTwEcRs5E4p/uahBMYHB+dY00k= </pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section20538210"><h4 class="sectiontitle">Sample Response (Example of listing objects in a bucket by specifying prefix)</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen658265711183">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: 367CB63A2F283044981285492719060
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
x-amz-bucket-region: R1
x-amz-id-2: MzY3Q0I2M0EyRjI4MzA0NDk4MTI4NTQ5MjcxOTA2MEFBQUFBQUFBYmJiYmJiYmJD
Content-Type: application/xml
Date: Sun, 26 Sep 2010 09:18:36 GMT
Content-Length: 560
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;ListBucketResult xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;Name&gt;example&lt;/Name&gt;
&lt;Prefix&gt;photos/2006/&lt;/Prefix&gt;
&lt;Marker&gt;&lt;/Marker&gt;
&lt;MaxKeys&gt;1000&lt;/MaxKeys&gt;
&lt;Delimiter&gt;/&lt;/Delimiter&gt;
&lt;IsTruncated&gt;false&lt;/IsTruncated&gt;
&lt;Contents&gt;
&lt;Key&gt;photos/2006/index.html&lt;/Key&gt;
&lt;LastModified&gt;2009-01-01T12:00:00.000Z&lt;/LastModified&gt;
&lt;ETag&gt;ce1acdafcc879d7eee54cf4e97334078&lt;/ETag&gt;
&lt;Size&gt;1234&lt;/Size&gt;
&lt;Owner&gt;
&lt;ID&gt;214153b66967d86f031c7487b4566cb1b&lt;/ID&gt;
&lt;DisplayName&gt;John Smith&lt;/DisplayName&gt;
&lt;/Owner&gt;
&lt;StorageClass&gt;STANDARD&lt;/StorageClass&gt;
&lt;/Contents&gt;
&lt;CommonPrefixes&gt;
&lt;Prefix&gt;photos/2006/January/&lt;/Prefix&gt;
&lt;/CommonPrefixes&gt;
&lt;/ListBucketResult&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section231362422611"><h4 class="sectiontitle">Sample Request (list of objects in a bucket and the CORS configuration being obtained with CORS configured for the bucket)</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen592995042615">GET / HTTP/1.1
User-Agent: curl/7.19.0 (x86_64-suse-linux-gnu) libcurl/7.19.0 OpenSSL/0.9.8{ zlib/1.2.3 libidn/1.10
Host: bucketname.obs.example.com
Accept: */*
Date: Tue, 28 Apr 2015 13:52:29 +0000
Authorization: AWS D13E0C94E722DD69423C:m/jxIj4ZYv4mjpk4xqlMTQKe7aQ=
Origin:www.example.com
Access-Control-Request-Headers:AllowedHeader_1</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560237__section9366232142615"><h4 class="sectiontitle">Sample Response (list of objects in a bucket and the CORS configuration being obtained with CORS configured for the bucket)</h4><pre class="screen" id="EN-US_TOPIC_0125560237__screen159092004277">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: B50AD92B37C934BAD314B5EB0BB5BEF2
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Access-Control-Allow-Origin: www.example.com
Access-Control-Allow-Methods: POST,GET,HEAD,PUT,DELETE
Access-Control-Allow-Headers: AllowedHeader_1
Access-Control-Max-Age: 100
Access-Control-Expose-Headers: ExposeHeader_1
x-amz-id-2: 1jSuajz0BqBC0sly+aYIIpbK4ETxBVeCYtBq3Lvc7H7zuCefvq9Kowtp0o3cmQ3X
Content-Type: application/xml
Date: Tue, 28 Apr 2015 13:52:29 GMT
Content-Length: 559</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0125560493.html">Operations on Buckets</a></div>
</div>
</div>