Archive Storage API
    • PDF

    Archive Storage API

    • PDF

    Article summary

    Available in Classic and VPC

    This guide describes the support information of the Archive Storage API, which is compatible with OpenStack Swift API, as well as common API call and authentication methods. The version supported by Archive Storage is 2.15.1 (Pike), and this guide is based on this version.

    Supported APIs

    The Archive Storage API can control various features required for the management and use of storage. For the list of supported operations, refer to the Archive Storage API Guide.

    Call API

    The following describes the steps to call the Archive Storage API.

    1. Create authentication key
    2. Check calling domain
    3. Create token
    4. Delete token

    1. Create authentication key

    The method of creating an authentication key for the use of the Archive Storage API is the same that of the Ncloud API. Refer to 1. Create authentication key of Ncloud API.

    2. Check calling domain

    While both HTTP and HTTPS protocols are supported, it is recommended to use HTTPS for data protection. The calling domain information by region is as follows.

    RegionAuthentication URLService URL
    Koreahttps://kr.archive.ncloudstorage.com:5000https://kr.archive.ncloudstorage.com

    3. Create token

    In NAVER Cloud Platform's Archive Storage, you can authenticate and create tokens using the OpenStack Keyston V3 API. Create tokens are entered as the X-Auth-Token header value when using account, container, and object operations.

    Note

    For more information on the OpenStack Keystone V3 API, refer to https://developer.openstack.org/api-ref/identity/v3/.

    Create a token using the password authentication method. From the information of the API authentication key created from My Page > Manage account > Manage authentication key in the NAVER Cloud Platform portal, use the access key ID as user name and the secret key as user password.
    When creating a token, you must limit it to the scope of the project. You can check the project ID and domain ID by clicking the [Check API usage information] button after requesting subscription from the Archive Storage console.
    Tokens are valid for 24 hours, and you can suspend the use by requesting token deletion.

    Statement

    The statement is as follows.

    POST /v3/auth/tokens
    

    Request

    The request parameters are as follows.

    NameInTypeDescription
    authbodyobjectAuth object
    identitybodyobjectIdentity object
    methodsbodyarrayAuthentication method. Uses the password authentication method
    passwordbodyobjectPassword object
    userbodyobjectUser object. id, password, and domain must be entered.
    domainbodyobjectDomain object. Use it by entering the ID. The domain ID can be checked by clicking the [Check API usage information] button from the Archive Storage console.
    scopebodyobjectScope object. Use it by specifying the usage scope of the token as project.
    projectbodyobjectProject object. Use it by entering the ID. The project ID can be checked by clicking the [Check API usage information] button from the Archive Storage console.

    The following is a request example.

    curl -i -X POST -H "Content-Type: application/json" https://kr.archive.ncloudstorage.com:5000/v3/auth/tokens -d '
    {
        "auth": {
            "identity": {
                "methods": [
                    "password"
                ],
                "password": {
                    "user": {
                        "name": "{access_key_id}",
                        "password": "{secret_key}",
                        "domain": {
                            "id": "{domain_id}"
                        }
                    }
                }
            },
            "scope": {
                "project": {
                    "id": "{project_id}"
                }
            }
        }
    }'
    

    Response

    The response parameters are as follows.

    NameInTypeDescription
    X-Subject-TokenheaderstringCreated token. The token value is delivered via header, rather than request body.
    tokenbodyobjectToken object
    methodsbodyarrayAuthentication method. Uses the password authentication method.
    rolesbodyarrayRole information list. Includes the ID and name information.
    expires_atbodystringToken expiration date and time. YYYY-MM-DDThh:mm:ss.sssZ (ISO 8601). If the token expiration date is null, it does not expire.
    issued_atbodystringToken creation date and time. YYYY-MM-DDThh:mm:ss.sssZ (ISO 8601)
    projectbodyobjectProject object. Includes the domain, ID, and name information.
    catalogbodyarrayCatalog object
    endpointsbodyarrayEndpoint information list
    region_idbodystringInformation of region where the service endpoint belongs to
    urlbodystringendpoint URL.
    interfacebodystringInterface type. The admin type can only be used by users with the admin permissions.
    typebodystringEndpoint type
    audit_idsbodyarrayA unique value generated randomly, which is used when searching the token information

    The following is a response example.

    HTTP/1.1 201 Created
    Date: Mon, 17 Sep 2018 23:46:11 GMT
    Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
    X-Subject-Token: gAAAAABboDzDOzds2V_2uzR9xn-AQkg5RRejRkGD9L5NuhwezSqqxpmY8ZNl48vYnC1GCn21AiffNtRrDedbvVq2usnPDH2qIp-Cq2Rx54fnH406NhhW9OiaKMzFwRzS7-js3j4xGMvEk2bPErmolAT4E1Du0vsF2azycC6sNcIMsVWcvd
    Vary: X-Auth-Token
    x-openstack-request-id: req-40a163b1-1fcc-423d-8ec3-3f40fd413ab6
    Content-Length: 1759
    Content-Type: application/json
    
    {
        "token": {
            "is_domain": false,
            "methods": [
                "password"
            ],
            "roles": [
                {
                    "id": "488fac210a714fcc91b61a32525b5693",
                    "name": "user"
                }
            ],
            "expires_at": "2018-09-18T23:46:11.000000Z",
            "project": {
                "domain": {
                    "id": "default",
                    "name": "Default"
                },
                "id": "0a11d053d4804b4c86d26ae1ff48dc1e",
                "name": "ncp-test-0"
            },
            "catalog": [
                {
                    "endpoints": [
                        {
                            "region_id": null,
                            "url": "https://kr.archive.ncloudstorage.com:5000/v3",
                            "region": null,
                            "interface": "public",
                            "id": "3bf62632266c4be0880cd7170ca90f55"
                        },
                        {
                            "region_id": null,
                            "url": "https://kr.archive.ncloudstorage.com:35357/v3",
                            "region": null,
                            "interface": "admin",
                            "id": "a29ce505b6cb429ea9ca15cb126251f7"
                        },
                        {
                            "region_id": null,
                            "url": "https://kr.archive.ncloudstorage.com:35357/v3",
                            "region": null,
                            "interface": "internal",
                            "id": "e524bcde8c5a4eec8750acf3e5819d69"
                        }
                    ],
                    "type": "identity",
                    "id": "ae1a92e6b64f4e9886517aaca2540b26",
                    "name": "keystone"
                },
                {
                    "endpoints": [
                        {
                            "region_id": "RegionOne",
                            "url": "https://kr.archive.ncloudstorage.com/v1/AUTH_0a11d053d4804b4c86d26ae1ff48dc1e",
                            "region": "RegionOne",
                            "interface": "internal",
                            "id": "80773860110449b9b78dc3a05f3f6360"
                        },
                        {
                            "region_id": "RegionOne",
                            "url": "https://kr.archive.ncloudstorage.com/v1/AUTH_0a11d053d4804b4c86d26ae1ff48dc1e",
                            "region": "RegionOne",
                            "interface": "public",
                            "id": "40f7102a57024603a53f41c4d8cb7cf3"
                        },
                        {
                            "region_id": "RegionOne",
                            "url": "https://kr.archive.ncloudstorage.com",
                            "region": "RegionOne",
                            "interface": "admin",
                            "id": "5297ae442163478e82f6f9630919b93f"
                        }
                    ],
                    "type": "object-store",
                    "id": "fb4cbd0bf18f4beb9ac29b09f0862ce2",
                    "name": "swift"
                }
            ],
            "user": {
                "password_expires_at": null,
                "domain": {
                    "id": "default",
                    "name": "Default"
                },
                "id": "ac1eca9c1b9f4900a0b1c4a82be49686",
                "name": "qQXiRLju7XHMXpmEskHn"
            },
            "audit_ids": [
                "U-O5n4rBSoO5jBykNXYNsw"
            ],
            "issued_at": "2018-09-17T23:46:11.000000Z"
        }
    }
    

    4. Delete token

    You can delete created tokens.

    Statement

    The statement is as follows.

    DELETE /v3/auth/tokens
    

    Request

    The request parameters are as follows.

    NameInTypeDescription
    X-Auth-TokenheaderstringValid token for authentication
    X-Subject-TokenheaderstringToken subject to deletion. Becomes unavailable as soon as the request succeeds.

    The following is a request example.

    curl -i -X DELETE -H "X-Auth-Token: $token" -H "X-Subject-Token: $token_to_delete" https://kr.archive.ncloudstorage.com:5000/v3/auth/tokens
    

    Response

    If the request succeeds, it returns the No Content (204) status code. The following is a response example.

    HTTP/1.1 204 No Content
    Date: Tue, 18 Sep 2018 05:44:00 GMT
    Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
    Vary: X-Auth-Token
    x-openstack-request-id: req-b6e8efbe-c3f2-41bc-8ca5-1067753318d4
    Content-Type: text/plain; charset=UTF-8
    

    Was this article helpful?

    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.