List containers GET /v1/{account}{?limit,marker,end_marker, format,prefix,delimiter}

Retrieves the account details and a list of its containers

If a format is not specified, the container list will be returned in text/plain format.

Also, when the query parameter is used, the list of containers can be retrieved, divided by page. When the number of containers retrieved is smaller than the value specified in the limit parameter, a list right to end will be retrieved. When the number of containers retrieved equals the value specified in the limit parameter, containers that are yet to be retrieved remain in the list.

When the list of containers is retrieved successfully, the following status code is returned:
  • 200 OK: The container list is included in the response body.
  • 204 No Content: The container does not exist or the result of filtering using the limit, marker or end_marker query parameters is empty.

Request headers

X-Auth-Token

Authentication token

Data Type Cardinality
String 1..1

X-Newest

When "True" is set, object storage searches for and returns the newest replica out of all of the replicas. If this header is omitted, object storage selects one normal replica and returns it. When "True" is specified in this header, the response time becomes longer. Only use this item when absolutely necessary.

Data Type Cardinality
Boolean 0..1

Accept

Valid values: application/json, application/xml, and text/xml.

Data Type Cardinality
String 0..*

Request Parameter

{account}

Name uniquely assigned by project

Data Type Cardinality
String 1..1

limit

Maximum number of lists to retrieve (1 - 10000). The default is 10000.

Data Type Cardinality
Int 0..1

marker

Returns a list of container names that follow the specified string.

Data Type Cardinality
String 0..1

end_marker

Returns a list of container names that precede the specified string.

Data Type Cardinality
String 0..1

format

Specifies the response format. Valid values: json, xml, and plain. The default is plain.

When format=xml or format=json is specified , the response will include not only the container name but also other details.

When format=plain is specified, a list of container names delimited by line feeds will be returned.

Data Type Cardinality
String 0..1

prefix

Returns a list of containers that start with this string.

Data Type Cardinality
String 0..1

Response Headers

Content-Length

Number of bytes of the response body

Data Type Cardinality
String 1..1

Content-Type

MIME type of the response body

Data Type Cardinality
String 1..1

X-Account-Object-Count

Number of objects in the account

Data Type Cardinality
Int 1..1

X-Account-Bytes-Used

Size (in bytes) of the objects stored in object storage by the account

Data Type Cardinality
Int 1..1

X-Account-Container-Count

Number of containers

Data Type Cardinality
Int 1..1

X-Account-Meta-name

Account metadata. {name} is the name of the metadata item.

Data Type Cardinality
String 0..*

X-Account-Meta-Temp-URL-Key

Secret key used for temporary URLs. If not set, this header will not be returned.

Data Type Cardinality
String 0..1

X-Account-Meta-Temp-URL-Key-2

Second secret key used for temporary URLs. If not set, this header will not be returned.

Data Type Cardinality
String 0..1

X-Trans-Id

ID assigned to this request. This is used when inquiring about issues.

Data Type Cardinality
Uuid 1..1

Date

Datetime when the transaction was executed

Data Type Cardinality
Datetime 1..1

Response Elements

account

Envelope of the response

Data Type Cardinality Parent Element Child Element(s)
account 1..1 None container

container

Set of container information

Data Type Cardinality Parent Element Child Element(s)
container 0..n account name

count

bytes

name

Container name

Data Type Cardinality Parent Element Child Element(s)
String 0..n container None

count

Number of objects held by the container

Data Type Cardinality Parent Element Child Element(s)
String 0..1 container None

bytes

Size of the objects held by the container

Data Type Cardinality Parent Element Child Element(s)
String 0..1 container None

Example List containers response: HTTP and JSON

Example of Request


curl -i $publicURL?format=json -X GET -H "X-Auth-Token: $token"       
     

Example of Response


HTTP/1.1 200 OK
Content-Length: 96
X-Account-Object-Count: 1
X-Timestamp: 1389453423.35964
X-Account-Meta-Subject: Literature
X-Account-Bytes-Used: 14
X-Account-Container-Count: 2
Content-Type: application/json; charset=utf-8
Accept-Ranges: bytes
X-Trans-Id: tx274a77a8975c4a66aeb24-0052d95365
Date: Fri, 17 Jan 2014 15:59:33 GMT

[
	{
		"count": 0,
		"bytes": 0,
		"name": "janeausten"
	},
	{
		"count": 1,
		"bytes": 14,
		"name": "marktwain"
	}
]       
     

Example List containers response: HTTP and XML

Example of Request


curl -i $publicURL?format=xml -X GET -H "X-Auth-Token: $token"       
     

Example of Response


HTTP/1.1 200 OK
Content-Length: 262
X-Account-Object-Count: 1
X-Timestamp: 1389453423.35964
X-Account-Meta-Subject: Literature
X-Account-Bytes-Used: 14
X-Account-Container-Count: 2
Content-Type: application/xml; charset=utf-8
Accept-Ranges: bytes
X-Trans-Id: tx69f60bc9f7634a01988e6-0052d9544b
Date: Fri, 17 Jan 2014 16:03:23 GMT

<?xml version="1.0" encoding="UTF-8"?>
	<account name="my_account">
		<container>
			<name>janeausten</name>
			<count>0</count>
			<bytes>0</bytes>
		</container>
		<container>
		<name>marktwain</name>
		<count>1</count>
		<bytes>14</bytes>
	</container>
</account>