doc-exports/docs/obs/api-swift/obs_03_0019.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

47 lines
2.6 KiB
HTML

<a name="obs_03_0019"></a><a name="obs_03_0019"></a>
<h1 class="topictitle1">Examples</h1>
<div id="body8662426"><div class="section" id="obs_03_0019__section2201390"><h4 class="sectiontitle">Show Account Details and List Containers (Asking for a Plain Response)</h4><p id="obs_03_0019__p61892272161737">Show account details and list containers. Do not set a query parameter. Use the default plain response format.</p>
</div>
<pre class="codeblock" id="obs_03_0019__codeblock56481447153128">curl -i -H "X-auth-token:b8b574e33b0a4f74a1961bed1b4784b8" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9" -X GET</pre>
<pre class="screen" id="obs_03_0019__screen4496161">HTTP/1.1 200 OK
X-Trans-Id: tx19cbb9377b2eb8a164ac8-c40e979e9b
Accept-Ranges: bytes
Content-Type: text/plain;charset=UTF-8
Date: Wed, 16 Sep 2015 07:10:18 GMT
X-Account-Bytes-Used: 0
X-Account-Container-Count: 3
X-Account-Object-Count: 0
X-Account-Project-Domain-Id: default
X-Timestamp: 1442371465.946
Content-Length: 23
<em id="obs_03_0019__i3993113416413">[23 Byte data content]</em></pre>
<div class="section" id="obs_03_0019__section60098234144536"><h4 class="sectiontitle">Show Account Details and List Containers (Asking for an XML Response)</h4><p id="obs_03_0019__p48068385162043">Show account details and list containers. Use the <strong id="obs_03_0019__b19750463">prefix=abc</strong> query parameter, and set the response format to <strong id="obs_03_0019__b43536440">xml</strong>.</p>
<pre class="codeblock" id="obs_03_0019__codeblock56618550154229">curl -i -H "X-auth-token:b8b574e33b0a4f74a1961bed1b4784b8" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9?format=xml&amp;prefix=abc" -X GET</pre>
</div>
<pre class="screen" id="obs_03_0019__screen46317933145020">HTTP/1.1 200 OK
X-Trans-Id: tx200c074b35f50910061e7-067ab2f1d4
Accept-Ranges: bytes
Content-Type: application/xml;charset=UTF-8
Date: Wed, 16 Sep 2015 07:12:09 GMT
X-Account-Bytes-Used: 0
X-Account-Container-Count: 3
X-Account-Object-Count: 0
X-Account-Project-Domain-Id: default
X-timestamp: 1442371465.946
Content-Length: 256
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;account name="AUTH_0ce042a9be6140769b12c1001d41bcf9"&gt;
&lt;container&gt;&lt;name&gt;abcc122&lt;/name&gt;&lt;count&gt;0&lt;/count&gt;&lt;bytes&gt;0&lt;/bytes&gt;&lt;/container&gt;
&lt;container&gt;&lt;name&gt;abcd123&lt;/name&gt;&lt;count&gt;0&lt;/count&gt;&lt;bytes&gt;0&lt;/bytes&gt;&lt;/container&gt;
&lt;/account&gt;</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0016.html">Show Account Details and List Containers</a></div>
</div>
</div>