GetAccount
    • PDF

    GetAccount

    • PDF

    Article summary

    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.

    MethodURI
    GET/v1/AUTH_{project_id}

    Request headers

    The following describes the headers.

    FieldTypeRequiredDescription
    X-Auth-TokenStringRequiredValue of the issued token
    X-NewestBooleanOptionalSet whether to respond with information from the most recent replica
    • true | false
      • true: Query all replicas and respond with information from the most recent replica
    • If the header is omitted, respond with the fastest information available
    AcceptStringOptionalSpecify the format of call results
    • application/json |application/xml |text/xml

    Request path parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    project_idStringRequiredProject ID

    Request query parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    limitIntegerOptionalLimit the maximum number of call results
    markerStringOptionalReturn the list after a specific container (bucket)
    end_markerStringOptionalReturn the list before a specific container (bucket)
    formatStringOptionalSpecify the format of the call results (JSON, XML, plain)
    prefixStringOptionalReturn the list of containers (buckets) that start with the string
    delimiterStringOptionalRepresent 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.

    FieldTypeRequiredDescription
    Content-TypeString-MIME type of the response result
    X-Account-Container-CountIntegerOptionalTotal number of containers (buckets) in the account
    X-Account-Object-CountintegerOptionalTotal number of objects in the account
    X-Account-Bytes-UsedIntegerOptionalTotal capacity size used by the account (bytes)
    X-TimestampInteger-Creation time of the account (Unix timestamp)
    X-Account-Storage-Policy-name-Container-CountInteger-Total number of containers (buckets) in the storage policy corresponding to name in the header name
    X-Account-Storage-Policy-name-Object-CountInteger-Total number of objects in the storage policy corresponding to name in the header name
    X-Account-Storage-Policy-name-Bytes-UsedInteger-Total capacity size (bytes) of the storage policy corresponding to name in the header name
    X-Account-Meta-Quota-BytesStringOptionalCapacity limit of the account (bytes)
    X-Account-Meta-nameString-Account metadata
    • The name part of the header name acts as a key for metadata
    X-Account-Meta-Temp-URL-KeyString-Secret key value for the temporary URL
    X-Account-Meta-Temp-URL-Key-2String-Second secret key value for the temporary URL
    Accept-RangesString-Range types allowed by the account
    Content-LengthString-Length of the response result (bytes)
    x-account-project-domain-idString-Domain ID required to use the API
    X-Trans-IdString-Transaction ID of the request
    X-Openstack-Request-IdString-Transaction ID of the request
    • Identical to X-Trans-Id
    DateString-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.

    FieldTypeRequiredDescription
    countInteger-Number of objects in the container
    bytesInteger-Size of all objects in the container (bytes)
    nameString-Name of the container
    last_modifiedString-Final modification date and time

    Response status codes

    The following describes response status codes.

    HTTP status codeCodeMessageDescription
    200-OKRequest succeeded
    204-No ContentIt 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>
    

    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.