doc-exports/docs/obs/api-swift/obs_03_0055.html
zhangyue 894279c39a Object Storage Service API Reference Swift V1
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-02-02 08:50:48 +00:00

192 lines
15 KiB
HTML

<a name="obs_03_0055"></a><a name="obs_03_0055"></a>
<h1 class="topictitle1">Request</h1>
<div id="body1442649345325"><div class="section" id="obs_03_0055__section39869956112928"><h4 class="sectiontitle">Method</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0055__table36630378113016" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Method description</caption><thead align="left"><tr id="obs_03_0055__row48730343113016"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.1.2.2.4.1.1"><p id="obs_03_0055__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_0055__p51296332113016"><strong id="obs_03_0055__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_0055__p61362190113016">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_03_0055__row15388804113016"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.2.2.4.1.1 "><p id="obs_03_0055__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_0055__p66153545194815">/v1/{account}/{container}/{object}{?temp_url_sig,temp_url_expires,multipart-manifest}</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.1.2.2.4.1.3 "><p id="obs_03_0055__p19784190113016">Downloads the object content and gets the object metadata.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="obs_03_0055__p28859943171535"><strong id="obs_03_0055__b31982717">{account}</strong> indicates the name of an account. <strong id="obs_03_0055__b19409000">{container}</strong> indicates the name of a container. <strong id="obs_03_0055__b40463275">{object}</strong> indicates the name of an object.</p>
<p id="obs_03_0055__p41688322113723">This operation does not involve a request body.</p>
</div>
<div class="section" id="obs_03_0055__section16623225"><h4 class="sectiontitle">Example Request</h4><p id="obs_03_0055__p4713936114329">Show the content and metadata of the <strong id="obs_03_0055__b63993653">goodbye</strong> object in the <strong id="obs_03_0055__b39071968">marktwain</strong> container:</p>
</div>
<pre class="screen" id="obs_03_0055__screen21590153">curl -i $publicURL/marktwain/goodbye -X GET -H "X-Auth-Token:$token"</pre>
<div class="section" id="obs_03_0055__section5103708"><h4 class="sectiontitle">Request Query Parameters</h4><p id="obs_03_0055__p57040706"><a href="#obs_03_0055__table2272850011511">Table 2</a> describes the query parameters for getting the object content.</p>
<div class="tablenoborder"><a name="obs_03_0055__table2272850011511"></a><a name="table2272850011511"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0055__table2272850011511" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request query parameters</caption><thead align="left"><tr id="obs_03_0055__row6616787111511"><th align="left" class="cellrowborder" valign="top" width="22.68%" id="mcps1.3.4.3.2.4.1.1"><p id="obs_03_0055__p5221421211511">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.09%" id="mcps1.3.4.3.2.4.1.2"><p id="obs_03_0055__p149275011511">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63.23%" id="mcps1.3.4.3.2.4.1.3"><p id="obs_03_0055__p5380390811511">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_03_0055__row1447313211511"><td class="cellrowborder" valign="top" width="22.68%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_03_0055__p3147304011511">temp_url_sig</p>
</td>
<td class="cellrowborder" valign="top" width="14.09%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_03_0055__p6628834111511">String</p>
<p id="obs_03_0055__p40578909144350">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="63.23%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_03_0055__p64656311511">Used with TempURL to sign the request.</p>
</td>
</tr>
<tr id="obs_03_0055__row581906811511"><td class="cellrowborder" valign="top" width="22.68%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_03_0055__p158250511511">temp_url_expires</p>
</td>
<td class="cellrowborder" valign="top" width="14.09%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_03_0055__p6107409911511">String</p>
<p id="obs_03_0055__p263167614445">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="63.23%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_03_0055__p4805497711511">Used with TempURL to specify the expiry time of the signature.</p>
</td>
</tr>
<tr id="obs_03_0055__row2984161311511"><td class="cellrowborder" valign="top" width="22.68%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_03_0055__p125161311511">multipart-manifest</p>
</td>
<td class="cellrowborder" valign="top" width="14.09%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_03_0055__p27063604115613">String</p>
<p id="obs_03_0055__p4187753014447">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="63.23%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_03_0055__p2455611111511">If the value is <strong id="obs_03_0055__b84235270615282">get</strong> and the object is a large object, the content of the <strong id="obs_03_0055__b842352706152842">manifest</strong> file for the static or dynamic large object, instead of the content of the large object, is returned.</p>
</td>
</tr>
<tr id="obs_03_0055__row3477494317475"><td class="cellrowborder" valign="top" width="22.68%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_03_0055__p6530699917475">filename</p>
</td>
<td class="cellrowborder" valign="top" width="14.09%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_03_0055__p66830643174919">String</p>
<p id="obs_03_0055__p64604883174919">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="63.23%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_03_0055__p5623698117475">If objects are accessed based on TempURL, use the value of <strong id="obs_03_0055__b42121251">filename</strong> to replace that of <strong id="obs_03_0055__b43546944">filename</strong> in the <strong id="obs_03_0055__b56378176">Content-Disposition</strong> header.</p>
</td>
</tr>
<tr id="obs_03_0055__row674571317476"><td class="cellrowborder" valign="top" width="22.68%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_03_0055__p953184217476">inline</p>
</td>
<td class="cellrowborder" valign="top" width="14.09%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_03_0055__p3388173217476">NA</p>
<p id="obs_03_0055__p15446161175116">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="63.23%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_03_0055__p6006575817476">If objects are accessed based on TempURL, replace the content of the <strong id="obs_03_0055__b46852469">Content-Disposition</strong> response header with <strong id="obs_03_0055__b19019038">inline</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_03_0055__section2186955"><h4 class="sectiontitle">Request Headers</h4><p id="obs_03_0055__p2508036145255">Request URI parameters</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0055__table22572327145255" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_03_0055__row16509377145255"><th align="left" class="cellrowborder" valign="top" width="20.66%" id="mcps1.3.5.3.1.4.1.1"><p id="obs_03_0055__p62191138145255">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.399999999999999%" id="mcps1.3.5.3.1.4.1.2"><p id="obs_03_0055__p38857041145255">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="64.94%" id="mcps1.3.5.3.1.4.1.3"><p id="obs_03_0055__p6842498145255">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_03_0055__row22125722145255"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.1.4.1.1 "><p id="obs_03_0055__p47353059145255">{account}</p>
</td>
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.1.4.1.2 "><p id="obs_03_0055__p10392605145255">String</p>
<p id="obs_03_0055__p26424588145255">(Required)</p>
</td>
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.1.4.1.3 "><p id="obs_03_0055__p60016882145255">A unique account name. In the current version, it indicates a unique ID for the account.</p>
</td>
</tr>
<tr id="obs_03_0055__row3281027145255"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.1.4.1.1 "><p id="obs_03_0055__p64436606145255">{container}</p>
</td>
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.1.4.1.2 "><p id="obs_03_0055__p51982602145255">String</p>
<p id="obs_03_0055__p65190238145255">(Required)</p>
</td>
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.1.4.1.3 "><p id="obs_03_0055__p45917893145255">A unique container name.</p>
<p id="obs_03_0055__p10607859145255">For details about container naming rules, see <a href="obs_03_0009.html">Naming Rules</a>.</p>
</td>
</tr>
<tr id="obs_03_0055__row4090594414533"><td class="cellrowborder" valign="top" width="20.66%" headers="mcps1.3.5.3.1.4.1.1 "><p id="obs_03_0055__p3260917814533">{object}</p>
</td>
<td class="cellrowborder" valign="top" width="14.399999999999999%" headers="mcps1.3.5.3.1.4.1.2 "><p id="obs_03_0055__p15345569145319">String</p>
<p id="obs_03_0055__p3892401145319">(Required)</p>
</td>
<td class="cellrowborder" valign="top" width="64.94%" headers="mcps1.3.5.3.1.4.1.3 "><p id="obs_03_0055__p576202614533">An object name.</p>
<p id="obs_03_0055__p63081133145352">For details about object naming rules, see <a href="obs_03_0009.html#obs_03_0009__section23579102">Object Naming Rules</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0055__table2401366117510" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="obs_03_0055__row677888617510"><th align="left" class="cellrowborder" valign="top" width="36.54%" id="mcps1.3.5.4.2.4.1.1"><p id="obs_03_0055__p1221893217510">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.939999999999998%" id="mcps1.3.5.4.2.4.1.2"><p id="obs_03_0055__p4923183717510">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46.52%" id="mcps1.3.5.4.2.4.1.3"><p id="obs_03_0055__p5387583217510">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_03_0055__row6543608016258"><td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_03_0055__p276595101632">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="16.939999999999998%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_03_0055__p258278761632">String</p>
<p id="obs_03_0055__p311242971632">(Required)</p>
</td>
<td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_03_0055__p380401411632">Authentication token.</p>
</td>
</tr>
<tr id="obs_03_0055__row3085148517510"><td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_03_0055__p1594232217510">Range</p>
</td>
<td class="cellrowborder" valign="top" width="16.939999999999998%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_03_0055__p1625968317510">String</p>
<p id="obs_03_0055__p610616616332">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_03_0055__p4196597817510">Range of the content to get.</p>
<p id="obs_03_0055__p10636357175328">For example:</p>
<ul id="obs_03_0055__ul43144865144956"><li id="obs_03_0055__li1826036614503">Range: bytes=-5. The last five bytes.</li><li id="obs_03_0055__li59280812144956">Range: bytes=10-15. The five bytes of data after a 10-byte offset.</li><li id="obs_03_0055__li34348940145028">Range: bytes=6-. Byte 6 and after.</li><li id="obs_03_0055__li43005760145123">Range: bytes=1-3,2-5. A multi-part response that contains bytes 1 to 3 inclusive, and bytes 2 to 5 inclusive.</li></ul>
</td>
</tr>
<tr id="obs_03_0055__row5866486617510"><td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_03_0055__p5423368217510">If-Match</p>
</td>
<td class="cellrowborder" valign="top" width="16.939999999999998%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_03_0055__p3085213117510">String</p>
<p id="obs_03_0055__p1811496216334">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_03_0055__p1599468417510">If the MD5 value of the queried object is equal to the specified value, the object is returned.</p>
</td>
</tr>
<tr id="obs_03_0055__row5029183717510"><td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_03_0055__p4710699517510">If-None-Match</p>
</td>
<td class="cellrowborder" valign="top" width="16.939999999999998%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_03_0055__p5757022117510">String</p>
<p id="obs_03_0055__p6571943116336">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_03_0055__p10059610175736">If the MD5 value of the queried object is not equal to the specified value, the object is returned.</p>
</td>
</tr>
<tr id="obs_03_0055__row6449063117510"><td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_03_0055__p5635865217510">If-Modified-Since</p>
</td>
<td class="cellrowborder" valign="top" width="16.939999999999998%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_03_0055__p164812217510">String</p>
<p id="obs_03_0055__p821133216338">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_03_0055__p6638903217510">If the queried object was modified before the specified time, the object is returned.</p>
</td>
</tr>
<tr id="obs_03_0055__row1211344217510"><td class="cellrowborder" valign="top" width="36.54%" headers="mcps1.3.5.4.2.4.1.1 "><p id="obs_03_0055__p1966997217586">If-Unmodified-Since</p>
</td>
<td class="cellrowborder" valign="top" width="16.939999999999998%" headers="mcps1.3.5.4.2.4.1.2 "><p id="obs_03_0055__p1940045917510">String</p>
<p id="obs_03_0055__p3751039816340">(Optional)</p>
</td>
<td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.5.4.2.4.1.3 "><p id="obs_03_0055__p2793332217510">If the queried object was not modified before the specified time, the object is returned.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0054.html">Get Object Content and Metadata</a></div>
</div>
</div>