GetContainerList
  • PDF

GetContainerList

  • PDF

Overview

Searches the list of containers (buckets).

Caution

The sub accounts can use it through the external API Gateway dedicated to sub accounts.
Please refer to the sub accounts for more information.

Statement

GET v1/AUTH_{project_id}

Request

Request parameter

Parameter name Requirement status Type Restrictions Description
limit (Optional) - integer - Maximum limit for the number of call results
marker (Optional) - string - Gets the list after a specific container
end_marker (Optional) - string - Gets the list before a specific container
prefix (Optional) - string - Calls the container list starting with the string
reverse (Optional) - string - Prints the list sorted by the container name
Default: false (descending)
X-Auth-Token (Optional) - string - Enter the issued token value
X-Newest (Optional) - boolean - - If true, it queries all replicas and responds with the information for the most recent replica.
- If the header is omitted, then it responds with the information with the fastest response.
Accept (Optional) - string - Specifies the format of the call result (application/JSON, application/XML, text/XML)

Response

Response header

Name In Type Description
X-Account-Meta-name header string - Metadata information for the account
- The name part of the header name serves as the metadata's key.
Content-Length header string Length of the response result (bytes)
X-Container-Object-Count header integer Number of objects in the container (bucket)
X-Container-Bytes-Used header integer Total capacity size used by the container (bucket) (bytes)
X-Container-Meta-Temp-URL-Key (Optional) header string Secret key value for the temporary URL
X-Container-Meta-Temp-URL-Key-2 (Optional) header string Second secret key value for the temporary URL
X-Timestamp header integer Creation time of the container (bucket) (Unix time)
X-Trans-Id header string Transaction ID of the request
X-Openstack-Request-Id header string Transaction ID of the request (same as X-Trans-Id)
Content-Type header string Format of the response result
Date header string Response time of the request (UTC)
last_modified body string Time when the object was last changed (UTC)
bytes body integer Size of the object (bytes)
name body string Name of the object

Examples

Request examples (JSON)

curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}?format=json

Response examples

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
X-Openstack-Request-Id: tx274a77a8975c4a66aeb24-0052d95365
Date: Fri, 17 Jan 2014 15:59:33 GMT
[
    {
        "count": 0,
        "bytes": 0,
        "name": "janeausten",
        "last_modified": "2013-11-19T20:08:13.283452"
    },
    {
        "count": 1,
        "bytes": 14,
        "name": "marktwain",
        "last_modified": "2016-04-29T16:23:50.460230"
    }
]

Request examples (XML)

curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}?format=XML

Response examples

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
X-Openstack-Request-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>
        <last_modified>2013-11-19T20:08:13.283452</last_modified>
    </container>
    <container>
        <name>marktwain</name>
        <count>1</count>
        <bytes>14</bytes>
        <last_modified>2016-04-29T16:23:50.460230</last_modified>
    </container>
</account>

Upon successful request, it returns the OK (200) or No Content (204) status code.
The No Content (204) status code is returned when the content type is plain, and no content exists for the request.
When the container (bucket) does not exist, it returns the Not Found (403) status code.

Caution

The sub accounts must use the List search API dedicated to sub accounts.


Was this article helpful?

What's Next