forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
337 lines
28 KiB
HTML
337 lines
28 KiB
HTML
<a name="obs_04_0160"></a><a name="obs_04_0160"></a>
|
|
|
|
<h1 class="topictitle1">Listing Objects in a Bucket (V2)</h1>
|
|
<div id="body0000001171857516"><div class="section" id="obs_04_0160__section5584184924715"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0160__p2379878">This operation lists objects in a bucket. To use this operation, you must have the permission to read the bucket.</p>
|
|
<p id="obs_04_0160__p1581825919218">If the bucket name is specified in a request URI and <strong id="obs_04_0160__b892583410211">list-type</strong> is explicitly set to <strong id="obs_04_0160__b374714453217">2</strong>, that is, <strong id="obs_04_0160__b88703341743">GET /?list-type</strong> is set to <strong id="obs_04_0160__b9302637549">2</strong>, descriptions of some or all objects in the bucket is returned in the format of the V2 API. Information about a maximum of 1000 objects can be returned at a time. If one or more of the <strong id="obs_04_0160__b1140619381653">prefix</strong>, <strong id="obs_04_0160__b824744119511">encoding-type</strong>, <strong id="obs_04_0160__b1827934314512">max-keys</strong>, <strong id="obs_04_0160__b18679847952">delimiter</strong>, <strong id="obs_04_0160__b7368115018517">fetch-owner</strong>, <strong id="obs_04_0160__b16719185311515">start-after</strong>, and <strong id="obs_04_0160__b1644971662">continuation-token</strong> parameters are also specified, the specified objects are returned based on the syntax described in <a href="#obs_04_0160__table14681180">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section57209668"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0160__screen56166629"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span>GET<span class="w"> </span>/?list-type=2<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Date:<span class="w"> </span>date
|
|
Authorization:<span class="w"> </span>authorization
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section96219311229"><h4 class="sectiontitle">Request Parameters</h4><p id="obs_04_0160__p16521811">This request uses parameters to list some objects in a bucket. Specific parameters are described in the following table.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0160__table14681180"></a><a name="table14681180"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0160__table14681180" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0160__row39988035"><th align="left" class="cellrowborder" valign="top" width="13.130000000000003%" id="mcps1.3.3.3.2.4.1.1"><p id="obs_04_0160__p17805368">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68.69000000000001%" id="mcps1.3.3.3.2.4.1.2"><p id="obs_04_0160__p28102680"><strong id="obs_04_0160__b1543218361979">Description</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.180000000000003%" id="mcps1.3.3.3.2.4.1.3"><p id="obs_04_0160__p18650850">Mandatory</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0160__row7327528191316"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0160__p1532712817133">li<span style="color:#676A6C;">st-ty</span>pe</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0160__p439954951315">It can be set to <strong id="obs_04_0160__b10503581351">2</strong> only, indicating that the ListObjectV2 API is used.</p>
|
|
<p id="obs_04_0160__p1639934961317">Type: integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0160__p4327172812130">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row34323897"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0160__p28772301">prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0160__p48855045">Lists objects that begin with the specified prefix.</p>
|
|
<p id="obs_04_0160__p37042226">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0160__p47630364">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row26020099"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0160__p27253273">start-after</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0160__p60031475">Specifies a marker when listing objects in a bucket. With a marker configured, objects after this marker will be returned in alphabetical order.</p>
|
|
<p id="obs_04_0160__p3412365">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0160__p7966153">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row4586517"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0160__p35963564">max-keys</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0160__p27367592">Specifies the maximum number (from <strong id="obs_04_0160__b207561213175419">1</strong> to <strong id="obs_04_0160__b575611136546">1000</strong>) of objects returned (in alphabetical order) in the response. If the value is beyond this range, only 1,000 objects are returned by default.</p>
|
|
<p id="obs_04_0160__p44981744">Type: integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0160__p19642622">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row42565870"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0160__p25283464">delimiter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0160__p14521714114815">Separator used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one <strong id="obs_04_0160__b11550113317149">CommonPrefixes</strong>. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one <strong id="obs_04_0160__b7550933151418">CommonPrefixes</strong>.</p>
|
|
<p id="obs_04_0160__p16521714194818">For example, there are three objects (<strong id="obs_04_0160__b928113510144">abcd</strong>, <strong id="obs_04_0160__b82814357147">abcde</strong>, and <strong id="obs_04_0160__b6281035151418">bbcde</strong>) in a bucket. If <strong id="obs_04_0160__b17980113561414">delimiter</strong> is set to <strong id="obs_04_0160__b109800355147">d</strong> and <strong id="obs_04_0160__b49801358144">prefix</strong> is set to <strong id="obs_04_0160__b1980235121414">a</strong>, objects <strong id="obs_04_0160__b18980203541419">abcd</strong> and <strong id="obs_04_0160__b1298133510142">abcde</strong> are grouped into a <strong id="obs_04_0160__b998110351141">CommonPrefixes</strong> with <strong id="obs_04_0160__b159811835121413">abcd</strong> as the prefix. If only <strong id="obs_04_0160__b198153515148">delimiter</strong> is set to <strong id="obs_04_0160__b159811535101411">d</strong>, objects <strong id="obs_04_0160__b1598243561413">abcd</strong> and <strong id="obs_04_0160__b2982133519146">abcde</strong> are grouped into a <strong id="obs_04_0160__b13982163511414">CommonPrefixes</strong> with <strong id="obs_04_0160__b998213591416">abcd</strong> as the prefix, and <strong id="obs_04_0160__b129823352146">bbcde</strong> is grouped separately into another <strong id="obs_04_0160__b29828353141">CommonPrefixes</strong> with <strong id="obs_04_0160__b12982143515143">bbcd</strong> as the prefix.</p>
|
|
<p id="obs_04_0160__p4120145715251">For a parallel file system, if this parameter is not specified, all the content in the directory is recursively listed by default, and subdirectories are also listed. In big data scenarios, parallel file systems usually have deep directory levels and each directory has a large number of files. In such case, you are advised to configure <strong id="obs_04_0160__b634812451857">[delimiter=/]</strong> to list the content in the current directory, but not list subdirectories, thereby improving the listing efficiency.</p>
|
|
<p id="obs_04_0160__p552014144819">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0160__p59499450">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row83242794310"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0160__p17321827164320">continuation-token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0160__p1298274718474">Specifies the token after which objects are returned in alphabetical order.</p>
|
|
<p id="obs_04_0160__p17982184724711">Type: string</p>
|
|
<p id="obs_04_0160__p186210361515">Valid value: value of <strong id="obs_04_0160__b172817511273">NextContinuationToken</strong> in the response body of the last request</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0160__p133242713438">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row17785193910171"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0160__p167851739101717">fetch-owner</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0160__p1078563971713">Specifies whether to return the object owner information.</p>
|
|
<p id="obs_04_0160__p1077616018206">Type: boolean</p>
|
|
<p id="obs_04_0160__p890719019203">Value options: <strong id="obs_04_0160__b191512312339">true</strong>, <strong id="obs_04_0160__b39151231193313">false</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0160__p878553961717">No</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section18519163972210"><h4 class="sectiontitle">Request Headers</h4><p id="obs_04_0160__p55973588">This request uses common request headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section13747132915619"><h4 class="sectiontitle">Request Elements</h4><p id="obs_04_0160__p162536425568">This request contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section108349145611"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0160__screen5774891"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
Date:<span class="w"> </span>date
|
|
x-obs-bucket-location:<span class="w"> </span>region
|
|
Content-Type:<span class="w"> </span>application/xml<span class="w"> </span>
|
|
Content-Length:<span class="w"> </span>length
|
|
<span class="nt"><Response</span><span class="w"> </span><span class="err">Body</span><span class="nt">></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section1443783810235"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0160__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section9457950112515"><h4 class="sectiontitle">Response Elements</h4><p id="obs_04_0160__p31592957">This response lists objects in XML format. Specific elements are described in <a href="#obs_04_0160__table17753706155228">Table 2</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0160__table17753706155228"></a><a name="table17753706155228"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0160__table17753706155228" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response elements</caption><thead align="left"><tr id="obs_04_0160__row5816417"><th align="left" class="cellrowborder" valign="top" width="35.27%" id="mcps1.3.8.3.2.3.1.1"><p id="obs_04_0160__p1367796">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="64.73%" id="mcps1.3.8.3.2.3.1.2"><p id="obs_04_0160__p57599360">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0160__row46893646"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p40288978">ListBucketResult</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p42181815">A list of objects in a bucket</p>
|
|
<p id="obs_04_0160__p44092021">Type: XML</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row61283877"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p65046979">Contents</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p34313913">Object metadata</p>
|
|
<p id="obs_04_0160__p40389765">Type: XML</p>
|
|
<p id="obs_04_0160__p27963568">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row50345523"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p51455566">CommonPrefixes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p7151293">Group information. If you specify a delimiter in the request, the response contains group information in <strong id="obs_04_0160__b11288112812391">CommonPrefixes</strong>.</p>
|
|
<p id="obs_04_0160__p64361640">Type: XML</p>
|
|
<p id="obs_04_0160__p42383849">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row57470118342"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p17747141113410">ContinuationToken</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p78041110144218">Parameter <strong id="obs_04_0160__b1846263854014">ContinuationToken</strong> specified in a request</p>
|
|
<p id="obs_04_0160__p180411017426">Type: string</p>
|
|
<p id="obs_04_0160__p1180491012425">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row15476181463520"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p14476414103510">KeyCount</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p16476171418353">Number of objects returned</p>
|
|
<p id="obs_04_0160__p480412514320">Type: integer</p>
|
|
<p id="obs_04_0160__p9804958437">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row34119332351"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p541153317353">NextContinuationToken</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p8825356"><strong id="obs_04_0160__b244654164116">ContinuationToken</strong> is returned when not all the objects are listed. The next list requests can be continued with this <strong id="obs_04_0160__b94463404115">ContinuationToken</strong>.</p>
|
|
<p id="obs_04_0160__p12319341">Type: string</p>
|
|
<p id="obs_04_0160__p43765212">Ancestor: ListVersionsResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row819034353510"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p8190114311353">StartAfter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p418203610437">Parameter <strong id="obs_04_0160__b23646470428">StartAfter</strong> specified in a request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row45910321"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p27748482">Delimiter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p33034564">Parameter <strong id="obs_04_0160__b324052224314">delimiter</strong> specified in a request</p>
|
|
<p id="obs_04_0160__p28875622">Type: string</p>
|
|
<p id="obs_04_0160__p58554014">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row4028061"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p57837514">ETag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p54327039">Base64-encoded 128-bit MD5 digest of an object. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if the ETag value is <strong id="obs_04_0160__b77818616535">A</strong> when an object is uploaded, but this value has changed to <strong id="obs_04_0160__b13847613537">B</strong> when the object is downloaded, it indicates that the object content has been changed. The ETag value is a hash of the object. The ETag reflects changes to the object content, rather than the object metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5. (If the object is encrypted on the server side, the ETag value is not the MD5 digest of the object, but the unique identifier calculated through server-side encryption.)</p>
|
|
<p id="obs_04_0160__p19181309">Type: string</p>
|
|
<p id="obs_04_0160__p38414053">Ancestor: ListBucketResult.Contents</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row13854468401"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p1085411613409">Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p1128926124012">Object type. This parameter is returned when the object type is not <strong id="obs_04_0160__b15557741164411">Normal</strong>.</p>
|
|
<p id="obs_04_0160__p13062604013">Type: string</p>
|
|
<p id="obs_04_0160__p6322268407">Ancestor: ListBucketResult.Contents</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row10182162"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p19448771">ID</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p31846650">Tenant ID of the object owner</p>
|
|
<p id="obs_04_0160__p18184394">Type: string</p>
|
|
<p id="obs_04_0160__p29441820">Ancestor: ListBucketResult.Contents.Owner</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row63649794"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p55359666">IsTruncated</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p54947971">Determines whether the returned list of objects is truncated. The value <strong id="obs_04_0160__b44800605">true</strong> indicates that the list was truncated and <strong id="obs_04_0160__b552262">false</strong> indicates that the list was not truncated.</p>
|
|
<p id="obs_04_0160__p24769695">Type: boolean</p>
|
|
<p id="obs_04_0160__p21600668">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row60188292"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p43413469">Key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p26830099">Object name</p>
|
|
<p id="obs_04_0160__p40144300">Type: string</p>
|
|
<p id="obs_04_0160__p25754381">Ancestor: ListBucketResult.Contents</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row30462839"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p51570899">LastModified</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p16493287">Time (UTC) when an object was last modified</p>
|
|
<p id="obs_04_0160__p14221862">Type: date</p>
|
|
<p id="obs_04_0160__p60887900">Ancestor: ListBucketResult.Contents</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row31131430"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p38617862">MaxKeys</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p41039090">Maximum number of objects returned</p>
|
|
<p id="obs_04_0160__p33807497">Type: string</p>
|
|
<p id="obs_04_0160__p35832019">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row54052723"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p16194462">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p36683058">Name of the requested bucket</p>
|
|
<p id="obs_04_0160__p61712066">Type: string</p>
|
|
<p id="obs_04_0160__p18537685">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row32621445"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p25091397">Owner</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p19137257">User information, including the domain ID and username</p>
|
|
<p id="obs_04_0160__p38017588">Type: XML</p>
|
|
<p id="obs_04_0160__p6613978">Ancestor: ListBucketResult.Contents</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row59525802"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p56860664">Prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p1261204118586">Prefix of an object name. Only objects whose names have this prefix are listed.</p>
|
|
<p id="obs_04_0160__p42311111">Type: string</p>
|
|
<p id="obs_04_0160__p45255687">Ancestor: ListBucketResult</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row4647999"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p40943623">Size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p28099143">Object size in bytes</p>
|
|
<p id="obs_04_0160__p51565700">Type: string</p>
|
|
<p id="obs_04_0160__p61438120">Ancestor: ListBucketResult.Contents</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0160__row16072172"><td class="cellrowborder" valign="top" width="35.27%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0160__p26777569">StorageClass</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.73%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0160__p21499466">Storage class of an object</p>
|
|
<p id="obs_04_0160__p59277470">Type: string</p>
|
|
<p id="obs_04_0160__p63735184">Value options: <strong id="obs_04_0160__b206114465488">STANDARD</strong>, <strong id="obs_04_0160__b361746144812">WARM</strong>, <strong id="obs_04_0160__b1262134612480">COLD</strong></p>
|
|
<p id="obs_04_0160__p36745745">Ancestor: ListBucketResult.Contents</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section478875194619"><h4 class="sectiontitle">Error Responses</h4><p id="obs_04_0160__p7577527">No special error responses are returned. For details about error responses, see <a href="obs_04_0115.html#obs_04_0115__d0e843">Table 2</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section13313112915466"><h4 class="sectiontitle">Sample Request</h4><p id="obs_04_0160__p43971619142018"><strong id="obs_04_0160__b176357916536">List all objects.</strong></p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_04_0160__screen26315321216"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span>GET<span class="w"> </span>/?list-type=2<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>02:28:25<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:KiyoYze4pmRNPYfmlXBfRTVxt8c=
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0160__section10425725174814"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0160__screen1022615115320"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span>
|
|
<span class="normal">14</span>
|
|
<span class="normal">15</span>
|
|
<span class="normal">16</span>
|
|
<span class="normal">17</span>
|
|
<span class="normal">18</span>
|
|
<span class="normal">19</span>
|
|
<span class="normal">20</span>
|
|
<span class="normal">21</span>
|
|
<span class="normal">22</span>
|
|
<span class="normal">23</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>BF260000016435D34E379ABD93320CB9
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSXiN7GPL/yXM6OSBaYCUV1zcY5OelWp
|
|
Content-Type:<span class="w"> </span>application/xml
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>02:23:30<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>586
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
|
|
<span class="nt"><ListBucketResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="nt"><Name></span>name<span class="nt"></Name></span>
|
|
<span class="w"> </span><span class="nt"><Prefix/></span>
|
|
<span class="w"> </span><span class="nt"><KeyCount></span>1<span class="nt"></KeyCount></span>
|
|
<span class="w"> </span><span class="nt"><MaxKeys></span>1000<span class="nt"></MaxKeys></span>
|
|
<span class="w"> </span><span class="nt"><IsTruncated></span>false<span class="nt"></IsTruncated></span>
|
|
<span class="w"> </span><span class="nt"><Contents></span>
|
|
<span class="w"> </span><span class="nt"><Key></span>obj<span class="nt"></Key></span>
|
|
<span class="w"> </span><span class="nt"><LastModified></span>2021-11-08T11:03:04.236Z<span class="nt"></LastModified></span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>"42648685023dcae595357d91a0936104"<span class="nt"></ETag></span>
|
|
<span class="w"> </span><span class="nt"><Size></span>4939<span class="nt"></Size></span>
|
|
<span class="w"> </span><span class="nt"><StorageClass></span>STANDARD<span class="nt"></StorageClass></span>
|
|
<span class="w"> </span><span class="nt"></Contents></span>
|
|
<span class="nt"></ListBucketResult></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0019.html">Operations on Buckets</a></div>
|
|
</div>
|
|
</div>
|
|
|