Method | URI | Description |
---|---|---|
GET | /v1/{account}/{container}{?limit,marker,end_marker,prefix,format,delimiter,path} | Shows details for a specified container and lists objects, sorted by name, in the container. |
Specify query parameters in the request to filter
the list and return a subset of object names. Omit
query parameters to return the complete list of object
names that are stored in the container, up to 10,000
names. The 10,000 maximum value is configurable. To
view the value for the cluster, issue a GET
/info
request.
Example requests and responses:
Show container details for and list objects in the
marktwain
container, and ask for a JSON response:curl -i $publicURL/marktwain?format=json -X GET -H "X-Auth-Token: $token"
Show container details for and list objects in the
marktwain
container, and ask for an XML response:curl -i $publicURL/marktwain?format=xml -X GET -H "X-Auth-Token: $token"
For a complete description of HTTP 1.1 header definitions, see Header Field Definitions.
If you use query parameters to page through a long
list of objects, you have reached the end of the list
if the number of items in the returned list is less
than the request limit
value. The list
contains more items if the number of items in the
returned list equals the limit
value.
If the request succeeds, the operation returns one of these status codes:
200. Success. The response body lists the objects.
204. Success. The response body shows no objects. Either the container has no objects or you are paging through a long list of names by using the
marker
,limit
, orend_marker
query parameters, and you have reached the end of the list.
If the container does not exist, the 404 Not Found error code is returned.
Normal response codes: 200, 204
Error response codes: NotFound (404)
This table shows the header parameters for the show container details and list objects request:
Name | Type | Description |
---|---|---|
| String (Required) | Authentication token. |
| Boolean (Optional) | If set to |
| String (Optional) | Instead of using the |
This table shows the URI parameters for the show container details and list objects request:
Name | Type | Description |
---|---|---|
| String | The unique name for the account. An account is also known as the project or tenant. |
| String | The unique name for the container. |
This table shows the query parameters for the show container details and list objects request:
Name | Type | Description |
---|---|---|
| Int (Optional) | For an integer value |
| String (Optional) | For a string value |
| String (Optional) | For a string value |
| String (Optional) | Prefix value. Object names in the response begin with this value. |
| String (Optional) | The response format. Valid values are
If you append the If you append the |
| Char (Optional) | Delimiter value, which returns the object names that are nested in the container. |
| String (Optional) | For a string value, returns the object names that are nested
in the pseudo path. Equivalent to setting delimiter to |
This table shows the header parameters for the show container details and list objects response:
Name | Type | Description |
---|---|---|
| String (Required) | The length of the response body that contains the list of names. If the operation fails, this value is the length of the error text in the response body. |
| Int (Required) | The number of objects. |
| String (Required) | The type of ranges that the object accepts. |
| String (Required) | The custom container metadata item, where
One |
| Int (Required) | The count of bytes used in total. |
| String (Required) | The MIME type of the list of names. If the operation fails, this value is the MIME type of the error text in the response body. |
| Uuid (Required) | A unique transaction identifier for this request. Your service provider might need this value if you report a problem. |
| Datetime (Required) | The transaction date and time. |
Example 2.3. Show container details response: HTTP and JSON
HTTP/1.1 200 OK Content-Length: 341 X-Container-Object-Count: 2 Accept-Ranges: bytes X-Container-Meta-Book: TomSawyer X-Timestamp: 1389727543.65372 X-Container-Bytes-Used: 26 Content-Type: application/json; charset=utf-8 X-Trans-Id: tx26377fe5fab74869825d1-0052d6bdff Date: Wed, 15 Jan 2014 16:57:35 GMT
[ { "hash":"451e372e48e0f6b1114fa0724aa79fa1", "last_modified":"2014-01-15T16:41:49.390270", "bytes":14, "name":"goodbye", "content_type":"application/octet-stream" }, { "hash":"ed076287532e86365e841e92bfc50d8c", "last_modified":"2014-01-15T16:37:43.427570", "bytes":12, "name":"helloworld", "content_type":"application/octet-stream" } ]
Example 2.4. Show container details response: HTTP and XML
HTTP/1.1 200 OK Content-Length: 500 X-Container-Object-Count: 2 Accept-Ranges: bytes X-Container-Meta-Book: TomSawyer X-Timestamp: 1389727543.65372 X-Container-Bytes-Used: 26 Content-Type: application/xml; charset=utf-8 X-Trans-Id: txc75ea9a6e66f47d79e0c5-0052d6be76 Date: Wed, 15 Jan 2014 16:59:35 GMT
<?xml version="1.0" encoding="UTF-8"?> <container name="marktwain"> <object> <name>goodbye</name> <hash>451e372e48e0f6b1114fa0724aa79fa1</hash> <bytes>14</bytes> <content_type>application/octet-stream</content_type> <last_modified>2014-01-15T16:41:49.390270</last_modified> </object> <object> <name>helloworld</name> <hash>ed076287532e86365e841e92bfc50d8c</hash> <bytes>12</bytes> <content_type>application/octet-stream</content_type> <last_modified>2014-01-15T16:37:43.427570</last_modified> </object> </container>
This operation does not return a response body.