GetContainerList
    • PDF

    GetContainerList

    • PDF

    Article Summary

    Overview

    Views the container (bucket) list.

    Caution

    The Subaccount can use it through the external API gateway dedicated to Subaccounts.
    For more information, see Subaccount.

    Syntax

    GET v1/AUTH_{project_id}
    

    Request

    Request parameters

    NameInTypeDescription
    limit (Optional)queryintegerMaximum limit for the number of call results
    marker (Optional)querystringGets the list after a specific container
    end_marker (Optional)querystringGets the list before a specific container
    prefix (Optional)querystringCalls the container list starting with the string
    reverse (Optional)querystringDisplays the list of container names in descending order
    default : false (descending)
    X-Auth-Token (Optional)headerstringEnter the issued token value
    Accept (Optional)headerstringSpecifies the format of the call result (application/JSON, application/XML, text/XML)

    Response

    Response header

    NameInTypeDescription
    X-Account-Meta-nameheaderstring- Metadata information of the account
    - The name part of the header name serves as the metadata's key.
    Content-LengthheaderstringLength of the response result (bytes)
    X-Container-Object-CountheaderintegerNumber of objects in the container (bucket)
    X-Container-Bytes-UsedheaderintegerTotal capacity size (bytes) used by the container (bucket)
    X-Container-Meta-Temp-URL-Key (Optional)headerstringSecret key value for the temporary URL
    X-Container-Meta-Temp-URL-Key-2 (Optional)headerstringSecond secret key value for the temporary URL
    X-TimestampheaderintegerCreated time (Unix time) of the container (bucket)
    X-Trans-IdheaderstringTransaction ID of the request
    X-Openstack-Request-IdheaderstringTransaction ID of the request (same as X-Trans-Id)
    Content-TypeheaderstringFormat of the response result
    DateheaderstringResponse time of the request (UTC)

    Response bodies

    NameInTypeDescription
    namebodystringName of the object
    countbodyintegerNumber of objects in the container (bucket)
    bytesbodyintegerTotal capacity size (bytes) used by the container (bucket)
    last_modifiedbodystringTime the container was last changed (UTC)

    Examples

    Request examples (JSON)

    curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}?format=json
    

    Response examples

    HTTP/1.1 200 OK
    Content-Length: 96
    X-Account-Object-Count: 1
    X-Timestamp: 1389453423.35964
    X-Account-Meta-Subject: Literature
    X-Account-Bytes-Used: 14
    X-Account-Container-Count: 2
    Content-Type: application/json; charset=utf-8
    Accept-Ranges: bytes
    X-Trans-Id: tx274a77a8975c4a66aeb24-0052d95365
    X-Openstack-Request-Id: tx274a77a8975c4a66aeb24-0052d95365
    Date: Fri, 17 Jan 2014 15:59:33 GMT
    
    [
        {
            "count": 0,
            "bytes": 0,
            "name": "janeausten",
            "last_modified": "2013-11-19T20:08:13.283452"
        },
        {
            "count": 1,
            "bytes": 14,
            "name": "marktwain",
            "last_modified": "2016-04-29T16:23:50.460230"
        }
    ]
    

    Request examples (XML)

    curl -i -X GET -H "X-Auth-Token: $token" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}?format=XML
    

    Response examples

    HTTP/1.1 200 OK
    Content-Length: 262
    X-Account-Object-Count: 1
    X-Timestamp: 1389453423.35964
    X-Account-Meta-Subject: Literature
    X-Account-Bytes-Used: 14
    X-Account-Container-Count: 2
    Content-Type: application/xml; charset=utf-8
    Accept-Ranges: bytes
    X-Trans-Id: tx69f60bc9f7634a01988e6-0052d9544b
    X-Openstack-Request-Id: tx69f60bc9f7634a01988e6-0052d9544b
    Date: Fri, 17 Jan 2014 16:03:23 GMT
    
    <?xml version="1.0" encoding="UTF-8"?>
    <account name="my_account">
        <container>
            <name>janeausten</name>
            <count>0</count>
            <bytes>0</bytes>
            <last_modified>2013-11-19T20:08:13.283452</last_modified>
        </container>
        <container>
            <name>marktwain</name>
            <count>1</count>
            <bytes>14</bytes>
            <last_modified>2016-04-29T16:23:50.460230</last_modified>
        </container>
    </account>
    

    Upon successful request, it responds to OK (200) or No Content (204) status code.
    No Content (204) status code is when the content type is plain and when no content exists for the request.
    When the container (bucket) does not exist, it responds to the Not Found (403) status code.

    Caution

    The sub account must use the API list view dedicated to SubAccounts


    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.