Data Box Frame overview
- Print
- PDF
Data Box Frame overview
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
Region | Endpoint |
---|---|
Republic of Korea (KR) | https://databoxframe.apigw.ntruss.com/api/v1 |
Request headers
Header name | Description |
---|---|
x-ncp-apigw-timestamp | It 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-key | Access key ID value issued from the NAVER Cloud Platform portal |
x-ncp-apigw-signature-v2 | This is the signature encrypted with Access Key ID value and Secret Key. |
x-ncp-lang | A 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 Code | Return code | Description |
---|---|---|
200 | - | General successful request |
400 | 10001 130*** | Request information and parameter error See error response message |
403 | 10002 | No authority to access requested information |
404 | 10009 | Resource does not exist |
500 | 130000 | Internal service error |
500 | 139999 | Linked service API call error |
Operation
Data Box Frame
- get-data-box-frame-list
- get-data-box-frame-detail
- get-data-box-frame-infra-list
- modify-data-box-frame-admin-infra
- change-data-box-frame-nas-volume-size
- return-data-box-frame
Data Box
- get-data-box-list
- get-data-box-summary-info
- get-data-box-infra-list
- get-hadoop-cluster-info
- get-linux-info
- get-tensor-flow-info
- create-data-box
- modify-data-box
- change-data-box-nas-volume-size
- set-block-external-network
- return-data-box
Import
Export
- get-export-apply-list
- get-export-apply-detail
- get-ssl-vpn-account-list
- get-source-nas-list
- apply-file-export
- return-file-export-apply
Export review
Object Storage-Bucket
Was this article helpful?