- Print
- PDF
GetAccount
- Print
- PDF
Available in Classic and VPC
View the list of containers (buckets) belonging to an account and their metadata.
Requests
The following describes the request format for the endpoint. The request format is as follows.
Method | URI |
---|---|
GET | /v1/AUTH_{project_id} |
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
|
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
project_id | String | Required | Project ID
|
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) |
format | String | Optional | Specify the format of the call results (JSON, XML, plain) |
prefix | String | Optional | Return the list of containers (buckets) that start with the string |
delimiter | String | Optional | Represent the list of containers (buckets) as a hierarchy, using the string as a delimiter |
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}"
-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}?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}?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-Account-Container-Count | Integer | Optional | Total number of containers (buckets) in the account |
X-Account-Object-Count | integer | Optional | Total number of objects in the account |
X-Account-Bytes-Used | Integer | Optional | Total capacity size used by the account (bytes) |
X-Timestamp | Integer | - | Creation time of the account (Unix timestamp) |
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-Account-Storage-Policy-name-Bytes-Used | Integer | - | Total capacity size (bytes) of the storage policy corresponding to name in the header name |
X-Account-Meta-Quota-Bytes | String | Optional | Capacity limit of the account (bytes) |
X-Account-Meta-name | String | - | Account metadata
|
X-Account-Meta-Temp-URL-Key | String | - | Secret key value for the temporary URL |
X-Account-Meta-Temp-URL-Key-2 | String | - | Second secret key value for the temporary URL |
Accept-Ranges | String | - | Range types allowed by the account |
Content-Length | String | - | Length of the response result (bytes) |
x-account-project-domain-id | String | - | Domain ID required to use the API |
X-Trans-Id | String | - | Transaction ID of the request |
X-Openstack-Request-Id | String | - | Transaction ID of the request
|
Date | String | - | Response time of the request (UTC) |
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"
[
{
"count": "number",
"last_modified":"string",
"bytes": "number",
"name":"string"
}
]
<?xml version="1.0" encoding="UTF-8"?>
<account name="AUTH_5942771066a0482bb6aaf7f5bc792b00">
<container>
<name>"string"</name>
<count>"number"</count>
<bytes>"number"</bytes>
<last_modified>"string"</last_modified>
</container>
</account>
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
count | Integer | - | Number of objects in the container |
bytes | Integer | - | Size of all objects in the container (bytes) |
name | String | - | Name of the container |
last_modified | String | - | Final modification date and time |
Response status codes
The following describes 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 |
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-container-0
ncloud-container-1
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: 206
Accept-Ranges: bytes
X-Timestamp: 1535685069.28154
X-Account-Bytes-Used: 0
X-Account-Container-Count: 2
Content-Type: application/json; charset=utf-8
X-Account-Object-Count: 0
x-account-project-domain-id: default
X-Trans-Id: txddbf20f97d1043128d032-005b97260f
X-Openstack-Request-Id: txddbf20f97d1043128d032-005b97260f
Date: Tue, 11 Sep 2018 02:18:55 GMT
[
{
"count":0,
"last_modified":"2018-09-11T02:11:35.010250",
"bytes":0,
"name":"ncloud-container-0"
},
{
"count":0,
"last_modified":"2018-09-11T02:11:41.481410",
"bytes":0,
"name":"ncloud-container-1"
}
]
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: 392
Accept-Ranges: bytes
X-Timestamp: 1535685069.28154
X-Account-Bytes-Used: 0
X-Account-Container-Count: 2
Content-Type: application/xml; charset=utf-8
X-Account-Object-Count: 0
x-account-project-domain-id: default
X-Trans-Id: tx1a6fca0d191645c186b35-005b9726d3
X-Openstack-Request-Id: tx1a6fca0d191645c186b35-005b9726d3
Date: Tue, 11 Sep 2018 02:22:11 GMT
<?xml version="1.0" encoding="UTF-8"?>
<account name="AUTH_5942771066a0482bb6aaf7f5bc792b00">
<container>
<name>ncloud-container-0</name>
<count>0</count>
<bytes>0</bytes>
<last_modified>2018-09-11T02:11:35.010250</last_modified>
</container>
<container>
<name>ncloud-container-1</name>
<count>0</count>
<bytes>0</bytes>
<last_modified>2018-09-11T02:11:41.481410</last_modified>
</container>
</account>