Data Box Frame overview
    • PDF

    Data Box Frame overview

    • PDF

    Article summary

    Overview

    The Data Box Frame API is provided in RESTful form. It is done through GET/POST/DELETE method call in HTTP format.
    Data Box Frame and data box can be generated through API, and import/export review of import/export/export approval/export rejected, etc. can be conducted.

    Common settings

    Data Box Frame API Endpoint

    RegionEndpoint
    Republic of Korea (KR)https://databoxframe.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 the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-apigw-signature-v2This is the signature encrypted with Access Key ID value and Secret Key.
    x-ncp-langA value to handle API response value in multiple languages. (Example input values: ko-KR, en-US, zh-CN; Default value: en-US)

    Authentication header

    The Data Box Frame API is provided through the NAVER Cloud Platform API Gateway, and two authentication keys (access key ID and secret key) are required to use an API registered in the API Gateway.

    For more information, refer to the NAVER Cloud Platform API Guide.

    • Create authentication key
      • From the NAVER Cloud Platform portal, go to My page > Account management > Authentication key management and click Generate new API authentication key to generate an access key ID and secret key.
      • An existing access key ID and secret key may be used instead.

    Request examples

    curl -i -s -X GET \
    -H "accept: application/json" \
    -H "x-ncp-iam-access-key: 1TrIkA58bQJknHn5hsC6" \
    -H "x-ncp-apigw-timestamp: 1682988927452" \
    -H "x-ncp-apigw-signature-v2: 0fyArnaWvkYYsepc6rMXKFTADwE2NnIGFHQ4GyKc3pU=" \
    -H "cache-control: no-cache" \
    "https://databoxframe.apigw.ntruss.com/api/v1/data-box-frame/get-data-box-frame-list"
    
    • Create a signature (add a new line with \n)

      • Create a StringToSign according to the request, encrypt via HMAC-SHA256 algorithm by using the SecretKey, and then encode via 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;
    
    }
    
    function makeSignature() {
        $space = " ";  // Space
        String  = "\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;
    }
    

    Common responses

    Returned as HTTP status codes in the response body.

    HTTP Status CodeReturn codeDescription
    200-General successful request
    40010001
    130***
    Request information and parameter error
    See error response message
    40310002No authority to access requested information
    40410009Resource does not exist
    500130000Internal service error
    500139999Linked service API call error

    Operation

    Data Box Frame

    Data Box

    Import

    Export

    Export review

    Object Storage-Bucket


    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.