GetAccount
    • PDF

    GetAccount

    • PDF

    Article Summary

    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

    NameInTypeDescription
    project_idpathstringProject ID
    limit (Optional)queryintegerLimits the maximum number of results.
    marker (Optional)querystringGets containers (buckets) after the specified container (bucket).
    end_marker (Optional)querystringGets containers (buckets) before the specified container (bucket).
    format (Optional)querystringResponse format (json, xml, plain)
    prefix (Optional)querystringGets containers (buckets) which start with the specified prefix.
    delimiter (Optional)querystringIt is used to display containers (buckets) in a hierarchical structure.
    X-Auth-Token (Optional)headerstringToken
    X-Newest (Optional)headerbooleanIf 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)headerstringResponse format (application/json, application/xml, text/xml)

    Response

    NameInTypeDescription
    Content-LengthheaderstringLength of the response result. (in bytes)
    X-Account-Meta-name (Optional)headerstringAccount metadata. The name part in the header name functions as a key of the metadata.
    X-Account-Meta-Temp-URL-Key (Optional)headerstringSecret key for the temporary URL
    X-Account-Meta-Temp-URL-Key-2 (Optional)headerstringSecond secret key for the temporary URL
    X-TimestampheaderintegerThe time when the account was created (in UNIX Time)
    X-Trans-IdheaderstringTransaction ID of the request
    X-Openstack-Request-IdheaderstringTransaction ID of the request. (same as X-Trans-Id)
    DateheaderstringResponse time of the request (in UTC)
    X-Account-Bytes-UsedheaderintegerTotal size used by the account (in bytes)
    X-Account-Container-CountheaderintegerNumber of containers (buckets) of the account
    X-Account-Object-CountheaderintegerNumber of objects of the account
    X-Account-Storage-Policy-name-Bytes-UsedheaderintegerTotal size of the storage policy for name (Bytes)
    X-Account-Storage-Policy-name-Container-CountheaderintegerNumber of containers (buckets) of the storage policy for name
    X-Account-Storage-Policy-name-Object-CountheaderintegerNumber of objects of the storage policy for name
    X-Account-Meta-Quota-Bytes (Optional)headerstringStorage limit of the account (in bytes)
    Content-TypeheaderstringMIME type of the response result
    countbodyintegerNumber of objects in the container
    bytesbodyintegerTotal size of objects in the container (in bytes)
    namebodystringContainer 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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.