GetContainerList
    • PDF

    GetContainerList

    • 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

    Views the container (bucket) list.

    Syntax

    GET https://{endpoint}/swift/v1
    

    Request

    Request header

    Header nameDescription
    x-ncp-apigw-timestamp- Time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    - If the time difference compared to the APIGW server is more than 5 minutes, then the request is considered invalid
    x-ncp-iam-access-keyAPI Key issued from NAVER Cloud Platform or AccessKey issued from Sub Account
    x-ncp-apigw-signature-v2- A signature that encrypts the Body of the example above with the SecretKey mapped to AccessKey
    - HmacSHA256 is used as the HMAC encryption algorithm
    x-ncp-region_codeThe region code of where the bucket of the data to be migrated from another cloud to NAVER Cloud is located

    Request parameters

    Parameter nameRequirement statusTypeRestrictionsDescription
    limit (Optional)-integer-Maximum limit for the number of call results
    marker (Optional)-string-Gets the list after a specific container
    end_marker (Optional)-string-Gets the list before a specific container
    prefix (Optional)-string-Calls the container list starting with the string
    reverse (Optional)-string-Displays the list of container names in descending order
    default : false (descending)

    Response

    Response header

    NameInTypeDescription
    X-Container-Meta-nameheaderstring- Metadata information of the container (bucket)
    - 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-Container-Meta-Quota-Count (Optional)headerstringLimit for number of objects in the container (bucket)
    X-Container-Meta-Quota-Bytes (Optional)headerstringCapacity limit of the container (bucket)
    X-Storage-Policy (Optional)headerintegerStorage policy value of the container (bucket)
    X-Container-Read (Optional)headerintegerREAD ACL of the container (bucket)
    X-Container-Write (Optional)headerintegerWRITE ACL of the container (bucket)
    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)
    hashheaderstringMD5 checksum value of the object
    content_typeheaderstringType of the object

    Response bodies

    NameInTypeDescription
    namebodystringName of the object
    countbodyintegerNumber of the object
    bytesbodyintegerSize of the object (bytes)
    last_modifiedbodystringTime the object was last changed (UTC)

    Examples

    Request examples (JSON)

    curl -X GET "https://archivestorage.apigw.ntruss.com/swift/v1/?limit=1&marker=test" -H "accept: application/json" -H "x-ncp-region-code: {regionCode}"
    -H "x-ncp-iam-access-key: {AccessKey} " 
    -H "x-ncp-apigw-timestamp: {current timestamp}" 
    -H "x-ncp-apigw-signature-v2: {generated signature}"
    

    Response examples

    HTTP/1.1 200 OK
    Accept: application/json
    connection: keep-alive
    Content-Length: 2577
    Keep-alive: timeout=60
    X-Account-Bytes-Used: 786133
    X-Account-Container-Count: 6
    X-Account-Object-Count: 1
    X-Timestamp: 1634538594.09393
    Content-Type: application/json; charset=utf-8
    X-Trans-Id: tx274a77a8975c4a66aeb24-0052d95365
    X-Openstack-Request-Id: tx274a77a8975c4a66aeb24-0052d95365
    Date: Mon, 18 Apr 2022 11:07:18 GMT
    
    [
        {
    	"name": "test",
    	"count": 0,
    	"bytes": 0,
    	"last_modified": "2022-04-20T01:10:10.123456"
    	}
    ]
    

    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.