2.1.1. List Containers

GET operations against the X-Storage-Url for an account are performed to retrieve a list of existing storage containers ordered by name. The sort order for the name is based on a binary comparison, a single built-in collating sequence that compares string data using SQLite's memcmp() function, regardless of text encoding. The following list describes the optional query parameters that are supported with this request.

Query Parameters

limit

For an integer value n, limits the number of results to n values.

marker

Given a string value x, return container names greater in value than the specified marker.

end_marker

Given a string value x, return container names less in value than the specified marker.

format

Specify either json or xml to return the respective serialized response.

At this time, a prefix query parameter is not supported at the account level.

 

Example 2.2. List Containers HTTP Request

GET /<api version>/<account> HTTP/1.1
Host: storage.swiftdrive.com
X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb

A list of containers is returned in the response body, one container per line. A 204 (No Content) HTTP return code will be passed back if the account has no containers.

 

Example 2.3. List Containers HTTP Response

HTTP/1.1 200 Ok
Date: Thu, 07 Jun 2010 18:57:07 GMT
Server: Apache
Content-Type: text/plain; charset=UTF-8
Content-Length: 32
  
images
movies
documents
backups



loading table of contents...