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>
55 lines
2.8 KiB
HTML
55 lines
2.8 KiB
HTML
<a name="obs_03_0032"></a><a name="obs_03_0032"></a>
|
|
|
|
<h1 class="topictitle1">Examples</h1>
|
|
<div id="body1442461140553"><div class="section" id="obs_03_0032__section2201390"><h4 class="sectiontitle">Show Container Details: Plain Format</h4><p id="obs_03_0032__p61892272161737">Show metadata of the <strong id="obs_03_0032__b54333736">testcontainer</strong> container and list objects. Do not set a query parameter. Use the default plain response format.</p>
|
|
</div>
|
|
<pre class="codeblock" id="obs_03_0032__codeblock4901598217258">curl -i http://172.28.54.10:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/testcontainer -H "x-auth-token:c1f21a34cce442efbd4957018263cc2c" -X GET</pre>
|
|
<pre class="screen" id="obs_03_0032__screen20404063172540">HTTP/1.1 200 OK
|
|
X-Trans-Id: tx0000015133a73737370a1-35e31d5be7
|
|
Accept-Ranges: bytes
|
|
Content-Length: 10
|
|
Content-Type: text/plain;charset=UTF-8
|
|
Date: Mon, 23 Nov 2015 09:22:58 GMT
|
|
X-Container-Bytes-Used: 5027
|
|
X-Container-Object-Count: 2
|
|
X-Timestamp: 1448270495.79460
|
|
|
|
<em id="obs_03_0032__i18991185264210">[10 Byte data content]</em></pre>
|
|
<div class="section" id="obs_03_0032__section60098234144536"><h4 class="sectiontitle">Show Container Details: JSON Format</h4><p id="obs_03_0032__p48068385162043">Show metadata of the <strong id="obs_03_0032__b15994879">testcontainer</strong> container and list objects. Specify the JSON response format.</p>
|
|
<pre class="codeblock" id="obs_03_0032__codeblock31392800173543">curl -i http://172.28.54.10:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/testcontainer?format=json -H "x-auth-token:c1f21a34cce442efbd4957018263cc2c" -X GET</pre>
|
|
</div>
|
|
<p id="obs_03_0032__p5003912162424">A JSON response is returned. The response body contains object information such as <strong id="obs_03_0032__b50433639">hash</strong>, <strong id="obs_03_0032__b51249570">bytes</strong>, and <strong id="obs_03_0032__b58592948">content_type</strong>.</p>
|
|
<pre class="screen" id="obs_03_0032__screen49399902173354">HTTP/1.1 200 OK
|
|
X-Trans-Id: tx0000015133aa2422370a1-13b8629ff1
|
|
Accept-Ranges: bytes
|
|
Content-Length: 335
|
|
Content-Type: application/json;charset=UTF-8
|
|
Date: Mon, 23 Nov 2015 09:26:09 GMT
|
|
X-Container-Bytes-Used: 5027
|
|
X-Container-Object-Count: 2
|
|
X-Timestamp: 1448270495.79460
|
|
|
|
[
|
|
{
|
|
"hash": "0481164fe6931fb86ca4d8e8b3689efb",
|
|
"bytes": 4337,
|
|
"content_type": "application/octet-stream",
|
|
"last_modified": "2015-11-23T09:22:22.859650",
|
|
"name": "jack"
|
|
},
|
|
{
|
|
"hash": "1e5d213baf0069e26805f5d4efc900fe",
|
|
"bytes": 690,
|
|
"content_type": "application/octet-stream",
|
|
"last_modified": "2015-11-23T09:22:44.748920",
|
|
"name": "rose"
|
|
}
|
|
]</pre>
|
|
</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>
|
|
|