- Print
- PDF
GetContainer
- Print
- PDF
Available in Classic and VPC
View the list of objects and metadata belonging to a container (bucket).
Requests
The following describes the request format for the endpoint. The request format is as follows.
Method | URI |
---|---|
GET | /v1/AUTH_{project_id}/{container} |
Request headers
The following describes the headers.
Field | Type | Required | Description |
---|---|---|---|
X-Auth-Token | String | Required | Value of the issued token |
X-Newest | Boolean | Optional | Set whether to respond with information from the most recent replica
|
Accept | String | Optional | Specify the format of call results
|
X-Account-Meta-Temp-URL-Key | String | Optional | Secret key value for the temporary URL |
X-Account-Meta-Temp-URL-Key-2 | String | Optional | Second secret key value for the temporary URL |
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
project_id | String | Required | Project ID
|
container | String | Required | Name of the container (bucket) |
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 |
format | String | Optional | Specify the format of the call results (JSON, XML, plain) |
delimiter | String | Optional | Represent the list of containers (buckets) as a hierarchy, using the string as a delimiter |
path | String | Optional | Return the list of objects inside that path
|
Request example
The following is a sample request.
Request without format query parameter
The following is a sample request without the format
query parameter.
curl -X GET "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}"
-H "X-Auth-Token: $token"
Request format query parameter as JSON
The following is a sample request for the format
query parameter as JSON.
curl -X GET "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}?format=json"
-H "X-Auth-Token: $token"
Request format query parameter as XML
The following is a sample request for the format
query parameter as JSON.
curl -X GET "https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}?format=xml"
-H "X-Auth-Token: $token"
Responses
The following describes the response format.
Response headers
The following describes the headers.
Field | Type | Required | Description |
---|---|---|---|
Content-Type | String | - | MIME type of the response result |
X-Container-Object-Count | Integer | - | Total number of objects in the container (bucket) |
X-Container-Bytes-Used | Integer | - | Total capacity size used by the container (bucket) (bytes) |
X-Timestamp | Integer | - | Creation time of the container (bucket) (Unix timestamp) |
Last-Modified | String | - | Most recent modification time (UTC) of the container |
Accept-Ranges | String | - | Range types allowed by the container (bucket) |
Content-Length | String | - | Length of the response result (bytes) |
X-Storage-Policy | String | Optional | Storage policy value of the container (bucket) |
X-Trans-Id | String | - | Transaction ID of the request |
X-Openstack-Request-Id | String | - | Transaction ID of the request
|
X-Container-Meta-name | String | Metadata of the container (bucket)
| |
X-Container-Meta-Temp-URL-Key | String | Optional | Secret key value for the temporary URL |
X-Container-Meta-Temp-URL-Key-2 | String | Optional | Second secret key value for the temporary URL |
X-Container-Meta-Quota-Count | String | Optional | Limit for number of objects in the container (bucket) |
X-Container-Meta-Quota-Bytes | String | Optional | Capacity limit of the container (bucket) |
X-Container-Read | String | Optional | READ ACL (access permissions) of the container (bucket) |
X-Container-Write | String | Optional | WRITE ACL (access permissions) of the container (bucket) |
X-Container-Sync-Key | String | Optional | Not used |
X-Container-Sync-To | String | Optional | Not used |
X-Versions-Location | String | Optional | Not used |
X-History-Location | String | Optional | Not used |
Date | String | - | Response time of the request (UTC) |
Response status codes
The following describes the response status codes.
HTTP status code | Code | Message | Description |
---|---|---|---|
200 | - | OK | Request succeeded |
204 | - | No Content | It occurs when the Content-Type is plain and there is nothing in the request |
404 | - | Not Found | It occurs when the container (bucket) doesn't exist |
Response syntax
The response syntax is as follows.
If requested without the format query parameter, only the names of the objects in the container (bucket) are responded to in plain text format.
"string"
[
{
"hash":"string",
"last_modified":"string",
"bytes":"number",
"name":"string",
"content_type":"string"
}
]
<?xml version="1.0" encoding="UTF-8"?>
<container name="string">
</container>
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
hash | String | - | MD5 checksum value of the object |
name | String | - | Name of the container (bucket) |
count | Integer | - | Number of objects in the container (bucket) |
bytes | Integer | - | Size of all objects in the container (bucket) (bytes) |
content_type | String | - | MIME type of the response result |
last_modified | String | - | Last modification date and time |
Response example
The following is a sample response.
Response when requested without format query parameter
The following is a sample response when requested without the format
query parameter
HTTP/1.1 200 OK
Content-Length: 38
Accept-Ranges: bytes
X-Timestamp: 1535685069.28154
X-Account-Bytes-Used: 0
X-Account-Container-Count: 2
Content-Type: text/plain; charset=utf-8
X-Account-Object-Count: 0
x-account-project-domain-id: default
X-Trans-Id: tx928992622dd248ee9b3e8-005b972569
X-Openstack-Request-Id: tx928992622dd248ee9b3e8-005b972569
Date: Tue, 11 Sep 2018 02:16:09 GMT
ncloud-test-object-0.txt
ncloud-test-object-1.txt
Response when format query parameter is requested as JSON
The following is a sample response when the format
query parameter is requested as JSON.
HTTP/1.1 200 OK
Content-Length: 352
X-Container-Object-Count: 2
X-Timestamp: 1536631895.01856
Accept-Ranges: bytes
X-Storage-Policy: standard01
Last-Modified: Tue, 11 Sep 2018 02:11:36 GMT
X-Container-Bytes-Used: 420024
Content-Type: application/json; charset=utf-8
X-Trans-Id: tx6bb706abe32b4ae5a49e8-005b978263
X-Openstack-Request-Id: tx6bb706abe32b4ae5a49e8-005b978263
Date: Tue, 11 Sep 2018 08:52:51 GMT
[
{
"hash":"9bd5b4f25faf491080654a34d57c3636",
"last_modified":"2018-09-11T02:12:29.991410",
"bytes":210012,
"name":"ncloud-test-object-0.txt",
"content_type":"text/plain"
},
{
"hash":"9bd5b4f25faf491080654a34d57c3636",
"last_modified":"2018-09-11T02:12:29.992600",
"bytes":210012,
"name":"ncloud-test-object-1.txt",
"content_type":"text/plain"
}
]
Response when format query parameter is requested in XML
The following is a sample request for the format
query parameter as JSON.
HTTP/1.1 200 OK
Content-Length: 520
X-Container-Object-Count: 2
X-Timestamp: 1536631895.01856
Accept-Ranges: bytes
X-Storage-Policy: standard01
Last-Modified: Tue, 11 Sep 2018 02:11:36 GMT
X-Container-Bytes-Used: 420024
Content-Type: application/xml; charset=utf-8
X-Trans-Id: txfff4e8574d7e43f38b8e8-005b9782ef
X-Openstack-Request-Id: txfff4e8574d7e43f38b8e8-005b9782ef
Date: Tue, 11 Sep 2018 08:55:11 GMT
<?xml version="1.0" encoding="UTF-8"?>
<container name="ncloud-container-0">
</container>