GetAccount
- Print
- PDF
GetAccount
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Overview
Gets containers (buckets) that belong to an account and its metadata.
Syntax
GET /v1/AUTH_{project_id}
Request
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID |
limit (Optional) | query | integer | Limits the maximum number of results. |
marker (Optional) | query | string | Gets containers (buckets) after the specified container (bucket). |
end_marker (Optional) | query | string | Gets containers (buckets) before the specified container (bucket). |
format (Optional) | query | string | Response format (json, xml, plain) |
prefix (Optional) | query | string | Gets containers (buckets) which start with the specified prefix. |
delimiter (Optional) | query | string | It is used to display containers (buckets) in a hierarchical structure. |
X-Auth-Token (Optional) | header | string | Token |
X-Newest (Optional) | header | boolean | If it is true, the API request queries all copies and responds with the information of the latest copy. If this header is not specified, the API request returns the information that it can respond most quickly with. |
Accept (Optional) | header | string | Response format (application/json, application/xml, text/xml) |
Response
Name | In | Type | Description |
---|---|---|---|
Content-Length | header | string | Length of the response result. (in bytes) |
X-Account-Meta-name (Optional) | header | string | Account metadata. The name part in the header name functions as a key of the metadata. |
X-Account-Meta-Temp-URL-Key (Optional) | header | string | Secret key for the temporary URL |
X-Account-Meta-Temp-URL-Key-2 (Optional) | header | string | Second secret key for the temporary URL |
X-Timestamp | header | integer | The time when the account was created (in 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) |
Date | header | string | Response time of the request (in UTC) |
X-Account-Bytes-Used | header | integer | Total size used by the account (in bytes) |
X-Account-Container-Count | header | integer | Number of containers (buckets) of the account |
X-Account-Object-Count | header | integer | Number of objects of the account |
X-Account-Storage-Policy-name -Bytes-Used | header | integer | Total size of the storage policy for name (Bytes) |
X-Account-Storage-Policy-name -Container-Count | header | integer | Number of containers (buckets) of the storage policy for name |
X-Account-Storage-Policy-name -Object-Count | header | integer | Number of objects of the storage policy for name |
X-Account-Meta-Quota-Bytes (Optional) | header | string | Storage limit of the account (in bytes) |
Content-Type | header | string | MIME type of the response result |
count | body | integer | Number of objects in the container |
bytes | body | integer | Total size of objects in the container (in bytes) |
name | body | string | Container name |
Examples
Request example
curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}
Response example
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
Request example (JSON)
curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}?format=json
Response example
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"
}
]
Request example (XML)
curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}?format=xml
Response example
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>
It returns OK (200) or No Content (204) status code if successful.
No Content (204) is returned when the Content-Type is plain and there is no content for the request.
Was this article helpful?