doc-exports/docs/obs/api-ref/obs_04_0022.html
Jawei, Li f1cb839979 OBS api-ref 2.0.38.SP5
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Jawei, Li <lijiawei5@huawei.com>
Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
2022-11-03 11:54:51 +00:00

637 lines
44 KiB
HTML

<a name="obs_04_0022"></a><a name="obs_04_0022"></a>
<h1 class="topictitle1">Listing Objects in a Bucket</h1>
<div id="body49142923"><div class="section" id="obs_04_0022__section5584184924715"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0022__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_0022__p21418904">If you specify only the bucket name in the request URI, for example <strong id="obs_04_0022__b12987115417">GET /BucketName</strong>, OBS returns descriptions for some or all objects (a maximum of 1000 objects) in the bucket. If you also specify one or more parameters among <strong id="obs_04_0022__b476019011422">prefix</strong>, <strong id="obs_04_0022__b156641433424">marker</strong>, <strong id="obs_04_0022__b763014614217">max-keys</strong>, and <strong id="obs_04_0022__b189545125426">delimiter</strong> in the request, OBS returns a list of objects as specified.</p>
<p id="obs_04_0022__p71702028165217">You can also add the <strong id="obs_04_0022__b1878613614433">versions</strong> parameter to the request to list multiple versions of an object in a bucket.</p>
</div>
<div class="section" id="obs_04_0022__section57209668"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0022__screen56166629"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4</pre></div></td><td class="code"><div class="highlight"><pre><span></span>GET / HTTP/1.1
Host: bucketname.obs.region.example.com
Date: date
Authorization: authorization
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0022__section45124968"><h4 class="sectiontitle">Request Syntax (for multi-version objects)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0022__screen15747352"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4</pre></div></td><td class="code"><div class="highlight"><pre><span></span>GET /?versions HTTP/1.1
Host: bucketname.obs.region.example.com
Date: date
Authorization: authorization
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0022__section3471528"><h4 class="sectiontitle">Request Parameters</h4><p id="obs_04_0022__p16521811">This request uses parameters to list some objects in a bucket. <a href="#obs_04_0022__table14681180">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="obs_04_0022__table14681180"></a><a name="table14681180"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0022__table14681180" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0022__row39988035"><th align="left" class="cellrowborder" valign="top" width="13.130000000000003%" id="mcps1.3.4.3.2.4.1.1"><p id="obs_04_0022__p17805368">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.69000000000001%" id="mcps1.3.4.3.2.4.1.2"><p id="obs_04_0022__p28102680">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.180000000000003%" id="mcps1.3.4.3.2.4.1.3"><p id="obs_04_0022__p18650850">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0022__row34323897"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0022__p28772301">prefix</p>
</td>
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0022__p48855045">Lists objects that begin with the specified prefix.</p>
<p id="obs_04_0022__p37042226">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0022__p47630364">No</p>
</td>
</tr>
<tr id="obs_04_0022__row26020099"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0022__p27253273">marker</p>
</td>
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0022__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_0022__p3412365">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0022__p7966153">No</p>
</td>
</tr>
<tr id="obs_04_0022__row4586517"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0022__p35963564">max-keys</p>
</td>
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0022__p27367592">Sets the maximum number of objects (in alphabetical order) returned in the response body. The value ranges from 1 to 1000. If the value has exceeded the upper limit, 1,000 objects are returned by default.</p>
<p id="obs_04_0022__p44981744">Type: integer</p>
</td>
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0022__p19642622">No</p>
</td>
</tr>
<tr id="obs_04_0022__row42565870"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0022__p25283464">delimiter</p>
</td>
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0022__p54017354815">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_0022__b20945155175712">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_0022__b547108125711">CommonPrefixes</strong>.</p>
<p id="obs_04_0022__p1140173114819">For example, there are three objects (<strong id="obs_04_0022__b17596122435716">abcd</strong>, <strong id="obs_04_0022__b388612298570">abcde</strong>, and <strong id="obs_04_0022__b217212335572">bbcde</strong>) in a bucket. If <strong id="obs_04_0022__b14121608584">delimiter</strong> is set to <strong id="obs_04_0022__b13729112145817">d</strong> and <strong id="obs_04_0022__b42663712583">prefix</strong> is set to <strong id="obs_04_0022__b2655191085814">a</strong>, objects <strong id="obs_04_0022__b4106382583">abcd</strong> and <strong id="obs_04_0022__b1937044595817">abcde</strong> are grouped into a <strong id="obs_04_0022__b640611210592">CommonPrefixes</strong> with <strong id="obs_04_0022__b19792231595">abcd</strong> as the prefix. If only <strong id="obs_04_0022__b8385174812013">delimiter</strong> is set to <strong id="obs_04_0022__b11870522019">d</strong>, objects <strong id="obs_04_0022__b26516816216">abcd</strong> and <strong id="obs_04_0022__b6747191116218">abcde</strong> are grouped into a <strong id="obs_04_0022__b81621124824">CommonPrefixes</strong> with <strong id="obs_04_0022__b105054403214">abcd</strong> as the prefix, and <strong id="obs_04_0022__b61471845324">bbcde</strong> is grouped separately into another <strong id="obs_04_0022__b2342149637">CommonPrefixes</strong> with <strong id="obs_04_0022__b1353828332">bbcd</strong> as the prefix.</p>
<p id="obs_04_0022__p440113318486">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0022__p59499450">No</p>
</td>
</tr>
<tr id="obs_04_0022__row83242794310"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0022__p17321827164320">key-marker</p>
</td>
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0022__p1298274718474">Position to start with when objects are listed</p>
<p id="obs_04_0022__p17982184724711">Type: string</p>
<p id="obs_04_0022__p186210361515">Valid value: value of <strong id="obs_04_0022__b029210474213">NextKeyMarker</strong> in the response body of the last request</p>
</td>
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0022__p133242713438">No</p>
</td>
</tr>
<tr id="obs_04_0022__row65733008"><td class="cellrowborder" valign="top" width="13.130000000000003%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0022__p22773420">version-id-marker</p>
</td>
<td class="cellrowborder" valign="top" width="68.69000000000001%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0022__p18339153314472">This parameter applies only to versioning objects.</p>
<p id="obs_04_0022__p32707692">Specifies the version ID to start with when objects in a bucket are listed. Objects are listed in alphabetical order (a maximum of 1,000 objects are displayed at a time). This parameter is used together with the <strong id="obs_04_0022__b157920685093657">key-marker</strong> in the request. If the value of <strong id="obs_04_0022__b16178829945">version-id-marker</strong> is not a version ID specified by <strong id="obs_04_0022__b11841929443">key-marker</strong>, <strong id="obs_04_0022__b171851129646">version-id-marker</strong> is invalid.</p>
<p id="obs_04_0022__p25933773">Type: string</p>
<p id="obs_04_0022__p32077368">Valid value: object version ID, that is, the value of <strong id="obs_04_0022__b64523179616">NextVersionIdMarker</strong> in the response body of the last request</p>
</td>
<td class="cellrowborder" valign="top" width="18.180000000000003%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0022__p30517193">No</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0022__section31243759"><h4 class="sectiontitle">Request Headers</h4><p id="obs_04_0022__p55973588">This request uses common request headers. <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a> lists the common request headers.</p>
</div>
<div class="section" id="obs_04_0022__section12758381"><h4 class="sectiontitle">Request Elements</h4><p id="obs_04_0022__p2556808">This request contains no elements.</p>
</div>
<div class="section" id="obs_04_0022__section47716571"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0022__screen5774891"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 status_code
Date: date
x-obs-bucket-location: region
Content-Type: application/xml
Content-Length: length
<span class="nt">&lt;Response</span> <span class="err">Body</span><span class="nt">&gt;</span>
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0022__section26795963"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0022__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_0022__section39837076"><h4 class="sectiontitle">Response Elements</h4><p id="obs_04_0022__p31592957">This response contains the XML list of buckets owned by the user. <a href="#obs_04_0022__table17753706155228">Table 2</a> describes the elements.</p>
<div class="tablenoborder"><a name="obs_04_0022__table17753706155228"></a><a name="table17753706155228"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0022__table17753706155228" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response elements</caption><thead align="left"><tr id="obs_04_0022__row5816417"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.9.3.2.3.1.1"><p id="obs_04_0022__p1367796"><strong id="obs_04_0022__b17732133018472">Element</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.9.3.2.3.1.2"><p id="obs_04_0022__p57599360"><strong id="obs_04_0022__b153917267470">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0022__row46893646"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p40288978">ListBucketResult</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p42181815">A list of objects in a bucket</p>
<p id="obs_04_0022__p44092021">Type: XML</p>
</td>
</tr>
<tr id="obs_04_0022__row61283877"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p65046979">Contents</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p34313913">Object metadata</p>
<p id="obs_04_0022__p40389765">Type: XML</p>
<p id="obs_04_0022__p27963568">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row50345523"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p51455566">CommonPrefixes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p7151293">Group information. If you specify a delimiter in the request, the response contains group information in <strong id="obs_04_0022__b1537116282101626">CommonPrefixes</strong>.</p>
<p id="obs_04_0022__p64361640">Type: XML</p>
<p id="obs_04_0022__p42383849">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row45910321"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p27748482">Delimiter</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p33034564">The delimiter parameter specified in a request</p>
<p id="obs_04_0022__p28875622">Type: string</p>
<p id="obs_04_0022__p58554014">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row4028061"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p57837514">ETag</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p54327039">128-bit MD5 digest of the Base64 code of an object. ETag is the unique identifier of the object content. It can be used to identify whether the object content is changed. For example, if ETag value is <strong id="obs_04_0022__b459115394720">A</strong> when an object is uploaded and the ETag value has changed to <strong id="obs_04_0022__b16592195319475">B</strong> when the object is downloaded, it indicates that the object content is changed. The actual ETag is the hash value of the object, which only reflects the changed content rather than the 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_0022__p19181309">Type: string</p>
<p id="obs_04_0022__p38414053">Ancestor: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="obs_04_0022__row13854468401"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p1085411613409">Type</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p1128926124012">Object type. This parameter is returned when the object type is not <strong id="obs_04_0022__b287233651017">Normal</strong>.</p>
<p id="obs_04_0022__p13062604013">Type: string</p>
<p id="obs_04_0022__p6322268407">Ancestor: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="obs_04_0022__row10182162"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p19448771">ID</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p31846650">Tenant ID of the object owner</p>
<p id="obs_04_0022__p18184394">Type: string</p>
<p id="obs_04_0022__p29441820">Ancestor: ListBucketResult.Contents.Owner</p>
</td>
</tr>
<tr id="obs_04_0022__row63649794"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p55359666">IsTruncated</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p54947971">Determines whether the returned list of objects is truncated. The value <strong id="obs_04_0022__b44800605">true</strong> indicates that the list was truncated and <strong id="obs_04_0022__b552262">false</strong> indicates that the list was not truncated.</p>
<p id="obs_04_0022__p24769695">Type: boolean</p>
<p id="obs_04_0022__p21600668">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row60188292"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p43413469">Key</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p26830099">Object name</p>
<p id="obs_04_0022__p40144300">Type: string</p>
<p id="obs_04_0022__p25754381">Ancestor: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="obs_04_0022__row30462839"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p51570899">LastModified</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p16493287">Time (UTC) when an object was last modified</p>
<p id="obs_04_0022__p14221862">Type: date</p>
<p id="obs_04_0022__p60887900">Ancestor: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="obs_04_0022__row11120194"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p28320555">Marker</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p12263624">Marker for the position from which objects in a bucket will be listed</p>
<p id="obs_04_0022__p43263758">Type: string</p>
<p id="obs_04_0022__p53829506">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row14703509"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p50133572">NextMarker</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p34287556">A marker for the last returned object in the list. <strong id="obs_04_0022__b18730125131318">NextMarker</strong> is returned when not all the objects are listed. You can set the <strong id="obs_04_0022__b1654312581147">Marker</strong> value to list the remaining objects in follow-up requests.</p>
<p id="obs_04_0022__p40152554">Type: string</p>
<p id="obs_04_0022__p25828669">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row31131430"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p38617862">MaxKeys</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p41039090">Maximum number of objects returned</p>
<p id="obs_04_0022__p33807497">Type: string</p>
<p id="obs_04_0022__p35832019">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row54052723"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p16194462">Name</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p36683058">Name of the requested bucket</p>
<p id="obs_04_0022__p61712066">Type: string</p>
<p id="obs_04_0022__p18537685">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row32621445"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p25091397">Owner</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p19137257">User information, including the domain ID and username</p>
<p id="obs_04_0022__p38017588">Type: XML</p>
<p id="obs_04_0022__p6613978">Ancestor: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="obs_04_0022__row59525802"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p56860664">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p1261204118586">Prefix of an object name. Only objects whose names have this prefix are listed.</p>
<p id="obs_04_0022__p42311111">Type: string</p>
<p id="obs_04_0022__p45255687">Ancestor: ListBucketResult</p>
</td>
</tr>
<tr id="obs_04_0022__row4647999"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p40943623">Size</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p28099143">Object size in bytes</p>
<p id="obs_04_0022__p51565700">Type: string</p>
<p id="obs_04_0022__p61438120">Ancestor: ListBucketResult.Contents</p>
</td>
</tr>
<tr id="obs_04_0022__row16072172"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0022__p26777569">StorageClass</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0022__p21499466">Storage class of an object</p>
<p id="obs_04_0022__p59277470">Type: enumeration</p>
<p id="obs_04_0022__p63735184">Valid value: STANDARD | WARM | COLD</p>
<p id="obs_04_0022__p36745745">Ancestor: ListBucketResult.Contents</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0022__table62276250" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Elements in the response message for listing multi-version objects.</caption><thead align="left"><tr id="obs_04_0022__row7159011"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.9.4.2.3.1.1"><p id="obs_04_0022__p43009039"><strong id="obs_04_0022__b198031973496">Element</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.9.4.2.3.1.2"><p id="obs_04_0022__p13750605"><strong id="obs_04_0022__b20215311124912">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0022__row24970367"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p9333837">ListVersionsResult</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p17843336">Container for the list of objects (including objects with multiple version IDs)</p>
<p id="obs_04_0022__p26372297">Type: container</p>
</td>
</tr>
<tr id="obs_04_0022__row36024087"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p32269923">Name</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p63726931">Bucket name</p>
<p id="obs_04_0022__p36671468">Type: string</p>
<p id="obs_04_0022__p61607759">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row17598926"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p16226888">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p39309571">Prefix of an object name. Only objects whose names have this prefix are listed. Type: string</p>
<p id="obs_04_0022__p18241824">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row29958695"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p10735194">KeyMarker</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p64244423">Marker for the object key from which objects will be listed</p>
<p id="obs_04_0022__p41328898">Type: string</p>
<p id="obs_04_0022__p36415764">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row59306422"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p39090871">VersionIdMarker</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p12243948"><span style="color:#676A6C;">Object version ID to start with when objects are listed</span></p>
<p id="obs_04_0022__p43086669">Type: string</p>
<p id="obs_04_0022__p52235709">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row359340"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p29106612">NextKeyMarker</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p8825356">Key marker for the last returned object in the list. <strong id="obs_04_0022__b900848008101353">NextKeyMarker</strong> is returned when not all the objects are listed. You can set the <strong id="obs_04_0022__b1094420250101358">KeyMarker</strong> value to list the remaining objects in follow-up requests.</p>
<p id="obs_04_0022__p12319341">Type: string</p>
<p id="obs_04_0022__p43765212">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row58342593"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p28129593">NextVersionIdMarker</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p63904574">Version ID marker for the last returned object in the list. <strong id="obs_04_0022__b1324079436101422">NextVersionIdMarker</strong> is returned when not all the objects are listed. You can set the <strong id="obs_04_0022__b1708349606101428">VersionIdMarker</strong> value to list the remaining objects in follow-up requests.</p>
<p id="obs_04_0022__p38270256">Type: string</p>
<p id="obs_04_0022__p8887991">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row12883059"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p36894838">MaxKeys</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p35691873">Maximum number of objects returned</p>
<p id="obs_04_0022__p52791405">Type: string</p>
<p id="obs_04_0022__p5360605">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row48245449"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p15567264">IsTruncated</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p52988892">Indicates whether the returned list of objects is truncated. The value <strong id="obs_04_0022__b6466053182618">true</strong> indicates that the list was truncated and <strong id="obs_04_0022__b19467253172613">false</strong> indicates that the list was not truncated.</p>
<p id="obs_04_0022__p7137988">Type: boolean</p>
<p id="obs_04_0022__p64241893">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row41306130"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p57462200">Version</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p23926623">Container of version information</p>
<p id="obs_04_0022__p14013018">Type: container</p>
<p id="obs_04_0022__p59008302">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row61312677"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p270916">DeleteMarker</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p21944224">Container for objects with deletion markers</p>
<p id="obs_04_0022__p63280288">Type: container</p>
<p id="obs_04_0022__p32651680">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row25429665"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p46536979">Key</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p11398941">Object name</p>
<p id="obs_04_0022__p35481611">Type: string</p>
<p id="obs_04_0022__p50899048">Ancestor: ListVersionsResult.Version | ListVersionsResult.DeleteMarker</p>
</td>
</tr>
<tr id="obs_04_0022__row55438253"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p61313532">VersionId</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p340191">Object version ID</p>
<p id="obs_04_0022__p3061724">Type: string</p>
<p id="obs_04_0022__p27555519">Ancestor: ListVersionsResult, Version | ListVersionsResult, DeleteMarker</p>
</td>
</tr>
<tr id="obs_04_0022__row46673081"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p22423198">IsLatest</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p4339764">Whether the object is the latest version. If the parameter value is <strong id="obs_04_0022__b1087241247101524">true</strong>, the object is the latest version.</p>
<p id="obs_04_0022__p39057881">Type: boolean</p>
<p id="obs_04_0022__p15976610">Ancestor: ListVersionsResult.Version | ListVersionsResult.DeleteMarker</p>
</td>
</tr>
<tr id="obs_04_0022__row9571770"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p37115937">LastModified</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p53600883">Time (UTC) when an object was last modified</p>
<p id="obs_04_0022__p12645905">Type: date</p>
<p id="obs_04_0022__p46704282">Ancestor: ListVersionsResult.Version | ListVersionsResult.DeleteMarker</p>
</td>
</tr>
<tr id="obs_04_0022__row17685361"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p23228146">ETag</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p2431675">128-bit MD5 digest of the Base64 code of an object. ETag is the unique identifier of the object content. It can be used to identify whether the object content is changed. The actual ETag is the hash value of the object. For example, if ETag value is <strong id="obs_04_0022__b28491718134313">A</strong> when an object is uploaded and the ETag value has changed to <strong id="obs_04_0022__b118501418204315">B</strong> when the object is downloaded, it indicates that the object content is changed. The ETag only reflects the changed content rather than the metadata. An uploaded object or copied object has a unique ETag after being encrypted using MD5.</p>
<p id="obs_04_0022__p21885083">Type: string</p>
<p id="obs_04_0022__p62748021">Ancestor: ListVersionsResult.Version</p>
</td>
</tr>
<tr id="obs_04_0022__row7498940153710"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p1849817401375">Type</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p4498164083719">Object type. This parameter is returned when the object type is not <strong id="obs_04_0022__b0989173313013">Normal</strong>.</p>
<p id="obs_04_0022__p20721852153713">Type: string</p>
<p id="obs_04_0022__p147285113816">Ancestor: ListVersionsResult.Version</p>
</td>
</tr>
<tr id="obs_04_0022__row27861284"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p42171530">Size</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p60450740">Object size in bytes</p>
<p id="obs_04_0022__p7185750">Type: string</p>
<p id="obs_04_0022__p64671754">Ancestor: ListVersionsResult.Version</p>
</td>
</tr>
<tr id="obs_04_0022__row45174882"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p35286822">Owner</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p39660363">User information, including the domain ID and username</p>
<p id="obs_04_0022__p21398953">Type: container</p>
<p id="obs_04_0022__p58372857">Ancestor: ListVersionsResult.Version | ListVersionsResult.DeleteMarker</p>
</td>
</tr>
<tr id="obs_04_0022__row55593666"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p6793103">ID</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p13370489">ID of the domain to which the object owner belongs</p>
<p id="obs_04_0022__p53225540">Type: string</p>
<p id="obs_04_0022__p9267815">Ancestor: ListVersionsResult.Version.Owner | ListVersionsResult.DeleteMarker.Owner</p>
</td>
</tr>
<tr id="obs_04_0022__row26394605"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p57588233">StorageClass</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p34135322">Storage class of an object</p>
<p id="obs_04_0022__p38782450">Type: enumeration</p>
<p id="obs_04_0022__p13497736">Ancestor: ListVersionsResult.Version</p>
</td>
</tr>
<tr id="obs_04_0022__row54370765"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p41955857">CommonPrefixes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p42981220">Group information. If you specify a delimiter in the request, the response contains group information in <strong id="obs_04_0022__b1975595415339">CommonPrefixes</strong>.</p>
<p id="obs_04_0022__p51286668">Type: container</p>
<p id="obs_04_0022__p58926833">Ancestor: ListVersionsResult</p>
</td>
</tr>
<tr id="obs_04_0022__row60579452"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0022__p7988560">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0022__p43093617">Indicates a different prefix in the group information in <strong id="obs_04_0022__b25360927">CommonPrefixes</strong>.</p>
<p id="obs_04_0022__p52298233">Type: string</p>
<p id="obs_04_0022__p922054">Ancestor: ListVersionsResult.CommonPrefixes</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0022__section22989369"><h4 class="sectiontitle">Error Responses</h4><p id="obs_04_0022__p7577527">No special error responses are involved. 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_0022__section4967514913"><h4 class="sectiontitle">Sample Request 1</h4><p id="obs_04_0022__p43971619142018"><strong id="obs_04_0022__b164528276314">List all objects.</strong></p>
<div class="codecoloring" codetype="Xml" id="obs_04_0022__screen26315321216"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>GET / HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.example.com
Accept: */*
Date: WED, 01 Jul 2015 02:28:25 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:KiyoYze4pmRNPYfmlXBfRTVxt8c=
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0022__section61601145011"><h4 class="sectiontitle">Sample Response 1</h4><div class="codecoloring" codetype="Xml" id="obs_04_0022__screen1022615115320"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: BF260000016435D34E379ABD93320CB9
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSXiN7GPL/yXM6OSBaYCUV1zcY5OelWp
Content-Type: application/xml
Date: WED, 01 Jul 2015 02:23:30 GMT
Content-Length: 586
<span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;</span>
<span class="nt">&lt;ListBucketResult</span> <span class="na">xmlns=</span><span class="s">&quot;http://obs.example.com/doc/2015-06-30/&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;Name&gt;</span>examplebucket<span class="nt">&lt;/Name&gt;</span>
<span class="nt">&lt;Prefix/&gt;</span>
<span class="nt">&lt;Marker/&gt;</span>
<span class="nt">&lt;MaxKeys&gt;</span>1000<span class="nt">&lt;/MaxKeys&gt;</span>
<span class="nt">&lt;IsTruncated&gt;</span>false<span class="nt">&lt;/IsTruncated&gt;</span>
<span class="nt">&lt;Contents&gt;</span>
<span class="nt">&lt;Key&gt;</span>object001<span class="nt">&lt;/Key&gt;</span>
<span class="nt">&lt;LastModified&gt;</span>2015-07-01T00:32:16.482Z<span class="nt">&lt;/LastModified&gt;</span>
<span class="nt">&lt;ETag&gt;</span>&quot;2fa3bcaaec668adc5da177e67a122d7c&quot;<span class="nt">&lt;/ETag&gt;</span>
<span class="nt">&lt;Size&gt;</span>12041<span class="nt">&lt;/Size&gt;</span>
<span class="nt">&lt;Owner&gt;</span>
<span class="nt">&lt;ID&gt;</span>b4bf1b36d9ca43d984fbcb9491b6fce9<span class="nt">&lt;/ID&gt;</span>
<span class="nt">&lt;/Owner&gt;</span>
<span class="nt">&lt;StorageClass&gt;</span>STANDARD<span class="nt">&lt;/StorageClass&gt;</span>
<span class="nt">&lt;/Contents&gt;</span>
<span class="nt">&lt;/ListBucketResult&gt;</span>
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0022__section535111413214"><h4 class="sectiontitle">Sample Request 2</h4><p id="obs_04_0022__p1728013302010"><strong id="obs_04_0022__b1014495213312">Filter objects</strong>.</p>
<p id="obs_04_0022__p1693585343617">Assuming that you have a bucket <strong id="obs_04_0022__b7597532384">examplebucket</strong> that contains objects <strong id="obs_04_0022__b89541836114117">newfile</strong>, <strong id="obs_04_0022__b658374724117">obj001</strong>, <strong id="obs_04_0022__b0336205244115">obj002</strong>, and <strong id="obs_04_0022__b04067234214">obs001</strong>. If you want to list only object <strong id="obs_04_0022__b136005343811">obj002</strong>, the request message is as follows:</p>
<pre class="screen" id="obs_04_0022__screen11516231145">GET /?marker=obj001&amp;prefix=obj HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.<em id="obs_04_0022__i14163125618202">region</em>.example.com
Accept: */*
Date: WED, 01 Jul 2015 02:28:25 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:KiyoYze4pmRNPYfmlXBfRTVxt8c=</pre>
</div>
<div class="section" id="obs_04_0022__section76081155815"><h4 class="sectiontitle">Sample Response 2</h4><div class="codecoloring" codetype="Xml" id="obs_04_0022__screen1041419535420"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: BF260000016435D758FBA857E0801874
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCShn/xAyk/xHBX6qgGSB36WXrbco0X80
Content-Type: application/xml
Date: WED, 01 Jul 2015 02:29:48 GMT
Content-Length: 707
<span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;</span>
<span class="nt">&lt;ListBucketResult</span> <span class="na">xmlns=</span><span class="s">&quot;http://obs.example.com/doc/2015-06-30/&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;Name&gt;</span>examplebucket<span class="nt">&lt;/Name&gt;</span>
<span class="nt">&lt;Prefix&gt;</span>obj<span class="nt">&lt;/Prefix&gt;</span>
<span class="nt">&lt;Marker&gt;</span>obj001<span class="nt">&lt;/Marker&gt;</span>
<span class="nt">&lt;MaxKeys&gt;</span>1000<span class="nt">&lt;/MaxKeys&gt;</span>
<span class="nt">&lt;IsTruncated&gt;</span>false<span class="nt">&lt;/IsTruncated&gt;</span>
<span class="nt">&lt;Contents&gt;</span>
<span class="nt">&lt;Key&gt;</span>obj002<span class="nt">&lt;/Key&gt;</span>
<span class="nt">&lt;LastModified&gt;</span>2015-07-01T02:11:19.775Z<span class="nt">&lt;/LastModified&gt;</span>
<span class="nt">&lt;ETag&gt;</span>&quot;a72e382246ac83e86bd203389849e71d&quot;<span class="nt">&lt;/ETag&gt;</span>
<span class="nt">&lt;Size&gt;</span>9<span class="nt">&lt;/Size&gt;</span>
<span class="nt">&lt;Owner&gt;</span>
<span class="nt">&lt;ID&gt;</span>b4bf1b36d9ca43d984fbcb9491b6fce9<span class="nt">&lt;/ID&gt;</span>
<span class="nt">&lt;/Owner&gt;</span>
<span class="nt">&lt;StorageClass&gt;</span>STANDARD<span class="nt">&lt;/StorageClass&gt;</span>
<span class="nt">&lt;/Contents&gt;</span>
<span class="nt">&lt;/ListBucketResult&gt;</span>
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0022__section10211101623018"><h4 class="sectiontitle">Sample Request 3</h4><p id="obs_04_0022__p35751942102013"><strong id="obs_04_0022__b111162713712">Versioning</strong></p>
<div class="codecoloring" codetype="Xml" id="obs_04_0022__screen8484163863919"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>GET /?versions HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.example.com
Accept: */*
Date: WED, 01 Jul 2015 02:29:45 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:iZeDESIMxBK2YODk7vIeVpyO8DI=
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0022__section16842103705414"><h4 class="sectiontitle">Sample Response 3</h4><div class="codecoloring" codetype="Xml" id="obs_04_0022__screen649271117557"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: BF260000016435D758FBA857E0801874
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCShn/xAyk/xHBX6qgGSB36WXrbco0X80
Content-Type: application/xml
Date: WED, 01 Jul 2015 02:29:48 GMT
Content-Length: 707
<span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;</span>
<span class="nt">&lt;ListVersionsResult</span> <span class="na">xmlns=</span><span class="s">&quot;http://obs.example.com/doc/2015-06-30/&quot;</span><span class="nt">&gt;</span>
<span class="nt">&lt;Name&gt;</span>bucket02<span class="nt">&lt;/Name&gt;</span>
<span class="nt">&lt;Prefix/&gt;</span>
<span class="nt">&lt;KeyMarker/&gt;</span>
<span class="nt">&lt;VersionIdMarker/&gt;</span>
<span class="nt">&lt;MaxKeys&gt;</span>1000<span class="nt">&lt;/MaxKeys&gt;</span>
<span class="nt">&lt;IsTruncated&gt;</span>false<span class="nt">&lt;/IsTruncated&gt;</span>
<span class="nt">&lt;Contents&gt;</span>
<span class="nt">&lt;Key&gt;</span>object001<span class="nt">&lt;/Key&gt;</span>
<span class="nt">&lt;VersionId&gt;</span>00011000000000013F16000001643A22E476FFFF9046024ECA3655445346485a<span class="nt">&lt;/VersionId&gt;</span>
<span class="nt">&lt;IsLatest&gt;</span>true<span class="nt">&lt;/IsLatest&gt;</span>
<span class="nt">&lt;LastModified&gt;</span>2015-07-01T00:32:16.482Z<span class="nt">&lt;/LastModified&gt;</span>
<span class="nt">&lt;ETag&gt;</span>&quot;2fa3bcaaec668adc5da177e67a122d7c&quot;<span class="nt">&lt;/ETag&gt;</span>
<span class="nt">&lt;Size&gt;</span>12041<span class="nt">&lt;/Size&gt;</span>
<span class="nt">&lt;Owner&gt;</span>
<span class="nt">&lt;ID&gt;</span>b4bf1b36d9ca43d984fbcb9491b6fce9<span class="nt">&lt;/ID&gt;</span>
<span class="nt">&lt;/Owner&gt;</span>
<span class="nt">&lt;StorageClass&gt;</span>STANDARD<span class="nt">&lt;/StorageClass&gt;</span>
<span class="nt">&lt;/Contents&gt;</span>
<span class="nt">&lt;/ListVersionsResult&gt;</span>
</pre></div>
</td></tr></table></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>