Example: Listing containers

Here's a sample GET request that returns a list of the containers in the context of the europe tenant.

Request with curl command line

curl -X GET http://api.hcp.example.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e -H "Accept: application/xml" -H "X-Auth-Token: dc5efec8f546455eac974e7bbfd0dd87"

Request headers

GET /swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e HTTP/1.1
X-Auth-Token: dc5efec8f546455eac974e7bbfd0dd87
Accept: application/XML

Response headers with containers

HTTP/1.1 200 OK
Date: Fri, 17 Jan 2014 16:03:23 GMT
Server: HCP V7.1.0.353
X-Trans-Id: 28b610b7-0fbc-4d83-821b-f7d2a3f20e27
Content-Type: application/xml;charset=UTF-8
X-Account-Object-Count: 1
X-Account-Container-Count: 2
X-Account-Meta-Subject: Literature
X-Account-Bytes-Used: 14
Content-Length: 0

Response body with containers

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<account name="europe">
     <container>
          <name>finance</name>
          <bytes>8192</bytes>
          <count>1</count>
     </container>
     <container>
          <name>human-resources</name>
          <bytes>0</bytes>
          <count>0</count>
     </container>
</account>

Trademarks and Legal Disclaimer

© 2017 Hitachi Data Systems Corporation. All rights reserved.