Available in Classic and VPC
Get the list of containers registered to an account.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
GET | - |
Request headers
The following describes the headers.
Field | Type | Required | Description |
---|---|---|---|
x-ncp-apigw-timestamp |
String | Required | Timestamp value
|
x-ncp-iam-access-key |
String | Required | API key issued by NAVER Cloud Platform or access key issued by Sub Account |
x-ncp-apigw-signature-v2 |
String | Required | Signature used to encrypt the body of the above example with the secret key that maps with the access key ID
|
x-ncp-region_code |
String | Required | Region code of the container
|
Request query parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
limit |
Integer | Optional | Limit the maximum number of call results |
marker |
String | Optional | Return the list after a specific container (bucket) |
end_marker |
String | Optional | Return the list before a specific container (bucket) |
prefix |
String | Optional | Return the list of containers (buckets) that start with the string |
reverse |
String | Optional | Output the list sorted by the name of the container
|
Request example
The request example is as follows:
curl -X GET "https://archivestorage.apigw.ntruss.com/swift/v1/?limit=1&marker=test" -H "accept: application/json" -H "x-ncp-region-code: {regionCode}"
-H "x-ncp-iam-access-key: {AccessKey} "
-H "x-ncp-apigw-timestamp: {current timestamp}"
-H "x-ncp-apigw-signature-v2: {generated signature}"
Response
This section describes the response format.
Response headers
The following describes the headers.
Field | Type | Required | Description |
---|---|---|---|
Connection |
String | - | TCP connection status between client and server |
Content-Type |
String | - | MIME type of the response result |
Date |
String | - | Response time of the request (UTC) |
Referrer-Policy |
String | - | HTTP Referrer header handling method |
Server |
String | - | Response server |
Transfer-Encoding |
String | - | Delivery method for response data |
X-Account-Bytes-Used |
Integer | - | Amount of capacity the container is using |
X-Account-Container-Count |
Integer | - | Total number of containers (buckets) in the account |
X-Account-Object-Count |
Integer | - | Total number of objects in the account |
x-account-project-domain-id |
String | - | Domain ID required to use the API |
X-Account-Storage-Policy-name-Bytes-Used |
Integer | - | Total capacity size (bytes) of the storage policy corresponding to name in the header name |
X-Account-Storage-Policy-name-Container-Count |
Integer | - | Total number of containers (buckets) in the storage policy corresponding to name in the header name |
X-Account-Storage-Policy-name-Object-Count |
Integer | - | Total number of objects in the storage policy corresponding to name in the header name |
x-ncp-apigw-response-origin |
String | - | Original source of the response |
x-ncp-trace-id |
String | - | ID for transaction tracking |
X-Trans-Id |
String | - | Transaction ID of the request |
X-Openstack-Request-Id |
String | - | Transaction ID of the request
|
X-Timestamp |
Integer | - | Creation time of the container (Unix time) |
Response syntax
The response syntax is as follows.
[
{
“name”: “test”,
“count”: 0,
“bytes”: 0,
“last_modified”: “2022-04-20T01:10:10.123456”
}
]
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
name |
String | - | Name of the container |
count |
Integer | - | Number of objects in the container |
bytes |
Integer | - | Size of all objects in the container (bytes) |
last_modified |
String | - | Final modification date and time |
Response status codes
For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.
Response example
The response example is as follows:
HTTP/1.1 200 OK
connection: keep-alive
content-type: application/json
date: Tue,16 Apr 2024 02:18:45 GMT
referrer-policy: unsafe-url
server: nginx
transfer-encoding: chunked
x-account-bytes-used: 30129
x-account-container-count: 3
x-account-object-count: 3
x-account-project-domain-id: default
x-account-storage-policy-standard00-bytes-used: 30129
x-account-storage-policy-standard00-container-count: 3
x-account-storage-policy-standard00-object-count: 3
x-ncp-apigw-response-origin: ENDPOINT
x-ncp-trace-id: 38cb565j34pho32or46pij0opg
x-openstack-request-id: tx5c30c46d8a0a450ea6291-00661de005
x-timestamp: 1711960998.26335
x-trans-id: tx5c30c46d8a0a450ea6291-00661de005
[
{
"name": "c11",
"count": 1,
"bytes": 13160,
"last_modified": "2024-04-01T05:43:18.300410"
},
{
"name": "c12",
"count": 2,
"bytes": 16969,
"last_modified": "2024-04-08T02:40:30.317280"
},
{
"name": "c33",
"count": 0,
"bytes": 0,
"last_modified": "2024-04-16T08:42:57.160680"
}
]