forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
197 lines
16 KiB
HTML
197 lines
16 KiB
HTML
<a name="obs_03_0030"></a><a name="obs_03_0030"></a>
|
|
|
|
<h1 class="topictitle1">Request</h1>
|
|
<div id="body1442461140549"><div class="section" id="obs_03_0030__section39869956112928"><h4 class="sectiontitle">Method</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0030__table36630378113016" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Method description</caption><thead align="left"><tr id="obs_03_0030__row48730343113016"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.1.2.2.4.1.1"><p id="obs_03_0030__p5336715811413">Method</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.1.2.2.4.1.2"><p id="obs_03_0030__p51296332113016"><strong id="obs_03_0030__b39273688114629">URI</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.1.2.2.4.1.3"><p id="obs_03_0030__p61362190113016">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0030__row15388804113016"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.2.2.4.1.1 "><p id="obs_03_0030__p38533588113016">GET</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.2.2.4.1.2 "><p id="obs_03_0030__p66153545194815">/v1/{account}/{container}{?limit,marker,end_marker,prefix,format,delimiter,path}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.2.2.4.1.3 "><p id="obs_03_0030__p19784190113016">Shows metadata of a specified container and lists objects, sorted by name in ascending order, in the container.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="obs_03_0030__p370882193913"><strong id="obs_03_0030__b1366648">{account}</strong> indicates the name of an account.</p>
|
|
<p id="obs_03_0030__p28859943171535"><strong id="obs_03_0030__b43589667">{container}</strong> indicates the name of a container.</p>
|
|
<p id="obs_03_0030__p41688322113723">This operation does not involve a request body.</p>
|
|
</div>
|
|
<div class="section" id="obs_03_0030__section16623225"><h4 class="sectiontitle">Example Request</h4><p id="obs_03_0030__p4713936114329">Show container details for and list objects in the <strong id="obs_03_0030__b842352706163030">marktwain</strong> container, and ask for a JSON response:</p>
|
|
</div>
|
|
<pre class="screen" id="obs_03_0030__screen21590153">curl -i $publicURL/marktwain?format=json -X GET -H "X-Auth-Token:$token"</pre>
|
|
<div class="section" id="obs_03_0030__section935707417105"><h4 class="sectiontitle">Request Headers</h4><p id="obs_03_0030__p2192709417105">Request URI parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0030__table6312612217105" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_03_0030__row2152913417105"><th align="left" class="cellrowborder" valign="top" width="20.66%" id="mcps1.3.4.3.1.4.1.1"><p id="obs_03_0030__p6613826417105">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.399999999999999%" id="mcps1.3.4.3.1.4.1.2"><p id="obs_03_0030__p3063031017105">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="64.94%" id="mcps1.3.4.3.1.4.1.3"><p id="obs_03_0030__p4935347317105">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0030__row833126117105"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.4.3.1.4.1.1 "><p id="obs_03_0030__p374351517105">{account}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.4.3.1.4.1.2 "><p id="obs_03_0030__p3478926517105">String</p>
|
|
<p id="obs_03_0030__p4466793317105">(Required)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.4.3.1.4.1.3 "><p id="obs_03_0030__p6133281117105">A unique account name. In the current version, it indicates a unique ID for the account.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row11460429171056"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.4.3.1.4.1.1 "><p id="obs_03_0030__p36034999171056">{container}</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.4.3.1.4.1.2 "><p id="obs_03_0030__p5541649117111">String</p>
|
|
<p id="obs_03_0030__p2898637717111">(Required)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.4.3.1.4.1.3 "><p id="obs_03_0030__p1106935171056">A unique container name.</p>
|
|
<p id="obs_03_0030__p33068020171218">For details about container naming rules, see <a href="obs_03_0009.html">Naming Rules</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="obs_03_0030__p1972554717105">Request header parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0030__table4331219617105" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_03_0030__row616552117105"><th align="left" class="cellrowborder" valign="top" width="20.66%" id="mcps1.3.4.5.1.4.1.1"><p id="obs_03_0030__p2964523117105">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.399999999999999%" id="mcps1.3.4.5.1.4.1.2"><p id="obs_03_0030__p231964817105">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="64.94%" id="mcps1.3.4.5.1.4.1.3"><p id="obs_03_0030__p1330182717105">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0030__row3335590117105"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.4.5.1.4.1.1 "><p id="obs_03_0030__p1747344217105">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.4.5.1.4.1.2 "><p id="obs_03_0030__p606271217105">String</p>
|
|
<p id="obs_03_0030__p5456441317105">(Required)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.4.5.1.4.1.3 "><p id="obs_03_0030__p5764131017105">Authentication token.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row4900974917105"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.4.5.1.4.1.1 "><p id="obs_03_0030__p1036676517105">Accept</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.4.5.1.4.1.2 "><p id="obs_03_0030__p3440162117105">String</p>
|
|
<p id="obs_03_0030__p4117913417105">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.4.5.1.4.1.3 "><p id="obs_03_0030__p4717558617105">Similar to the <strong id="obs_03_0030__b60335392">format</strong> query parameter, set this header to <strong id="obs_03_0030__b6147620">application/json</strong>, <strong id="obs_03_0030__b55328585">application/xml</strong>, or <strong id="obs_03_0030__b28195225">text/xml</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_03_0030__section58545636171022"><h4 class="sectiontitle">Request Query Parameters</h4><p id="obs_03_0030__p44576042171022"><a href="#obs_03_0030__table53889649171022">Table 2</a> describes the query parameters of "Show Container Details and List Objects".</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_03_0030__table53889649171022"></a><a name="table53889649171022"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0030__table53889649171022" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request query parameters</caption><thead align="left"><tr id="obs_03_0030__row59416866171022"><th align="left" class="cellrowborder" valign="top" width="20.66%" id="mcps1.3.5.3.2.4.1.1"><p id="obs_03_0030__p48036802171022">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.399999999999999%" id="mcps1.3.5.3.2.4.1.2"><p id="obs_03_0030__p55110629171022">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="64.94%" id="mcps1.3.5.3.2.4.1.3"><p id="obs_03_0030__p44548109171022">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0030__row61990606171022"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_03_0030__p55183153171022">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_03_0030__p40650446171022">Int</p>
|
|
<p id="obs_03_0030__p30309697171022">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_03_0030__p3118953193014">Limits the number of objects in a query result.</p>
|
|
<p id="obs_03_0030__p979710154316">Value range: <strong id="obs_03_0030__b72325614313">0</strong> to <strong id="obs_03_0030__b6404157163110">10000</strong></p>
|
|
<p id="obs_03_0030__p12129162913319">Default value: <strong id="obs_03_0030__b14129029163112">10000</strong></p>
|
|
<p id="obs_03_0030__p39166373171022">If this parameter is set to a value larger than 10000, an error is reported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row16953040171022"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_03_0030__p31019014171022">marker</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_03_0030__p29512212171022">String</p>
|
|
<p id="obs_03_0030__p64283324171022">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_03_0030__p39566787171022">Returns object names that are greater than the specified marker.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row20556763171022"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_03_0030__p54485091171022">end_marker</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_03_0030__p51216227171022">String</p>
|
|
<p id="obs_03_0030__p58292864171022">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_03_0030__p24101544171022">Returns object names that are smaller than the specified marker.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row15587309171022"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_03_0030__p54612551171022">format</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_03_0030__p61540538171022">String</p>
|
|
<p id="obs_03_0030__p16993932171022">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_03_0030__p34331222171022">Sets the format of the returned object list. The valid values are <strong id="obs_03_0030__b50404064216283">plain</strong> (default), <strong id="obs_03_0030__b842352706162717">json</strong>, and <strong id="obs_03_0030__b842352706162722">xml</strong>. Its function is the same as <strong id="obs_03_0030__b842352706162739">Accept</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row40545544171022"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_03_0030__p62963636171022">prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_03_0030__p66889752171022">String</p>
|
|
<p id="obs_03_0030__p65136863171022">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_03_0030__p41594571171022">Returns objects that have the specified prefix.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row38806827171022"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_03_0030__p56345257171022">delimiter</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_03_0030__p563071171022">Char</p>
|
|
<p id="obs_03_0030__p5067643171022">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_03_0030__p7825929171022">Returns the object names that are nested in the container.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row3324501171022"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_03_0030__p849189171022">path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_03_0030__p1675502171022">String</p>
|
|
<p id="obs_03_0030__p15079519171022">(Optional)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_03_0030__p13481487171022">Returns the object names that are nested in the specified path. Equivalent to setting <strong id="obs_03_0030__b14393865">delimiter</strong> to <strong id="obs_03_0030__b62435929">/</strong> and <strong id="obs_03_0030__b25052449">prefix</strong> to the path with a slash (/) at the end.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="obs_03_0030__p181304911119">There are two issues with OpenStack Swift that OBS (compatible with OpenStack Swift) does not have:</p>
|
|
<ul id="obs_03_0030__ul770811105115"><li id="obs_03_0030__li3875840121115">If the first character of an object is set to the <strong id="obs_03_0030__b11916344434">delimiter</strong> parameter, the expected result cannot be correctly returned.<p id="obs_03_0030__p19742191321513">For example, if <strong id="obs_03_0030__b1723620235443">bucket01</strong> contains object <strong id="obs_03_0030__b196900445448">obj0</strong>, and the <strong id="obs_03_0030__b645131034511">delimiter=o</strong> parameter is used in a query, OBS (compatible with OpenStack Swift) returns result <strong id="obs_03_0030__b1511905510450">o</strong>. OpenStack Swift, however, returns <strong id="obs_03_0030__b11232192544618">obj0</strong> which is incorrect.</p>
|
|
</li><li id="obs_03_0030__li18167103071519">If the <strong id="obs_03_0030__b77591445134714">path</strong> parameter is used, subdirectories cannot be shown.<p id="obs_03_0030__p1957943616159">Given the same configuration for OBS (compatible with OpenStack Swift) and OpenStack Swift, suppose a container includes objects <strong id="obs_03_0030__b185911658144916">o/1</strong>, <strong id="obs_03_0030__b1699715016502">o/2</strong>, and <strong id="obs_03_0030__b1888181275012">o/subdir1/1</strong>. When the request (with <strong id="obs_03_0030__b11330174522">path=o</strong> used) is sent to OpenStack Swift, <strong id="obs_03_0030__b582919597518">o/subdir1/1</strong> would not be found.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0030__table11243172514177" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_03_0030__row73915256175"><th align="left" class="cellrowborder" valign="top" width="29.29%" id="mcps1.3.5.5.2.3.1.3.1.1"><p id="obs_03_0030__p133910258174">Requested Party</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70.71%" id="mcps1.3.5.5.2.3.1.3.1.2"><p id="obs_03_0030__p63911025181716">Returned Result</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0030__row1039182531711"><td class="cellrowborder" valign="top" width="29.29%" headers="mcps1.3.5.5.2.3.1.3.1.1 "><p id="obs_03_0030__p1391325161713">OpenStack Swift</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.71%" headers="mcps1.3.5.5.2.3.1.3.1.2 "><p id="obs_03_0030__p15391102591718">o/1</p>
|
|
<p id="obs_03_0030__p183911825111716">o/2</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0030__row1439152581710"><td class="cellrowborder" valign="top" width="29.29%" headers="mcps1.3.5.5.2.3.1.3.1.1 "><p id="obs_03_0030__p1639182517172">OBS</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.71%" headers="mcps1.3.5.5.2.3.1.3.1.2 "><p id="obs_03_0030__p2391825101713">o/1</p>
|
|
<p id="obs_03_0030__p1739117255170">o/2</p>
|
|
<p id="obs_03_0030__p16391162551718">o/subdir1/1</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0029.html">Show Container Details and List Objects</a></div>
|
|
</div>
|
|
</div>
|
|
|