Listing containers
This section describes how to obtain information about the containers present in an account.
Using the Swift client CLI
Execute the following request:
swift --os-auth-token=token --os-storage-url= http://storage.vedams.com/v1/AUTH_8e43ee201cbc4b70bd8bb2f8ae10f025 list
The response is as follows:
cities countries
Using cURL
The following command shows you how to obtain the same container information using cURL. It shows that the account comprises of two containers and six objects.
Execute this request:
curl -X GET –i http://storage.vedams.com/v1/AUTH_8e43ee201cbc4b70bd8bb2f8ae10f025 -H 'X-Auth_token: token'
The response to the request is as follows:
HTTP/1.1 200 OK X-Account-Container-Count: 2 X-Account-Object-Count: 6 cities countries ...
Get OpenStack Object Storage (Swift) Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.