MENU
      Cloud Data Box overview

        Cloud Data Box overview


        Article summary

        Overview

        The Cloud Data Box API is provided in the RESTful format. It is done through the HTTP method GET/POST/DELETE method call.
        You can import Data Box files via the API.

        Common attributes

        Cloud Data Box API Endpoint

        RegionEndpoint
        Korea (KR)https://databox.apigw.ntruss.com/api/v1

        Request headers

        Header nameDescription
        x-ncp-apigw-timestampIt indicates the time elapsed since January 1, 1970 00:00:00 UTC in milliseconds, and request is considered invalid if the timestamp differs from the current time by more than 5 minutes
        x-ncp-apigw-timestamp:{Timestamp}
        x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
        x-ncp-iam-access-key:{Account Access Key}
        x-ncp-apigw-signature-v2This is the signature encrypted access key ID value and secret key.
        x-ncp-apigw-signature-v2:{API Gateway Signature}
        x-ncp-langA value to handle API response value in multiple languages. (Example of input values: ko-KR, en-US, and zh-CN / Default: en-US)
        x-ncp-lang:{language code}

        Authentication header

        The Data Box API is provided via NAVER Cloud Platform’s API Gateway, and you need to get two types of authentication keys (access key ID, secret ky) to use APIs registered in API Gateway.

        For more information, see NAVER Cloud Platform API Guide.

        • Create authentication key
          • Go to My Page > Manage account > Manage authentication key menu in the NAVER Cloud Platform portal, and then click Create a new API authentication key to create an access key ID and a secret key.
          • If you have an access key ID and secret key, use them.

        Request example

        curl -X GET "https://databox.apigw.ntruss.com/api/v1/import/get-bucket-list" -H "accept: application/json" -H "x-ncp-iam-access-key: ft1GKEpjSc53lHuqtAxE" -H "x-ncp-apigw-timestamp: 1699857251740" -H "x-ncp-apigw-signature-v2: CsVRem0Sn4ToxvxfIcd8/CiIxx7GjQNXrL5075BVTdY=" -H "cache-control: no-cache" -H "pragma: no-cache"
        Shell
        • Create a signature (add a new line with \n)

          • Create StringToSign matching the request, encrypt using SecretKey with HmacSHA256 algorithm, and encode using Base64.
          • This value is used as x-ncp-apigw-signature-v2.
        • Sample code

        public String makeSignature() {
            String space = " ";  // Space
            String newLine = "\n";  // Line break
            String method = "POST";  // HTTP method
            String url = "/api/v1/mails";  // Full URL under "/" (including query strings), excluding the domain
            String timestamp = "{timestamp}";  // Current timestamp (epoch, millisecond)
            String accessKey = "{accessKey}";  // access key id (from portal or sub account)
            String secretKey = "{secretKey}";  // secret key (from portal or sub account)
        
            String message = new StringBuilder()
                .append(method)
                .append(space)
                .append(url)
                .append(newLine)
                .append(timestamp)
                .append(newLine)
                .append(accessKey)
                .toString();
        
            SecretKeySpec signingKey = new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA256");
            Mac mac = Mac.getInstance("HmacSHA256");
            mac.init(signingKey);
        
            byte[] rawHmac = mac.doFinal(message.getBytes("UTF-8"));
            String encodeBase64String = Base64.getEncoder().encodeToString(rawHmac);
        
          return encodeBase64String;
        
        }
        Java
        function makeSignature() {
            $space = " ";  // Space
            $newLine = "\n";  // Line break
            $method = "POST";  // HTTP method
            $uri= "/api/v1/mails";  // Full URL under "/" (including query strings), excluding the domain
            $timestamp = "{timestamp}";  // Current timestamp (epoch, millisecond)
            $accessKey = "{accessKey}";  // access key id (from portal or sub account)
            $secretKey = "{secretKey}";  // secret key (from portal or sub account)
        
            $hmac = $method.$space.$uri.$newLine.$timestamp.$newLine.$accessKey;
            $signautue = base64_encode(hash_hmac('sha256', $hmac, $secretKey,true));
        
            return $signautue;
        }
        PHP

        Operation

        Import

        Export

        Object Storage-Bucket

        NAS


        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.