Congirue request
- Print
- PDF
Congirue request
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
To call the KMS Rest API 1.0, you must perform API Gateway and Sub Account authentications.
For API calls using API Gateway, see API Gateway Manual (formerly, user guide). An API request message consists of the following.
Request configuration
Dedicated headers
x-ncp-apigw-timestamp
x-ncp-iam-access-key
x-ncp-apigw-signature-v1 or x-ncp-apigw-signature-v2
API Gateway request signature v1 request example
Header
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-apigw-api-key:{API Gateway API Key}
x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v1:{API Gateway Signature}
Content-Type:application/json
Body
fieldName: {Base64 Encoded message}
URL
https://kms.apigw.ntruss.com/keys/v1/{keyTag}/{action}
API Gateway request signature v2 request example
Header
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v2:{API Gateway Signature}
Content-Type:application/json
Body
fieldName: {Base64 Encoded message}
URL
https://kms.apigw.ntruss.com/keys/v2/{keyTag}/{action}
Response format
The data encrypted with the master key and returned consists of "KMS prefix + ciphertext." The KMS prefix consists of [ncpkms:version information], which is required for decryption, so arbitrary removal or manipulation is prohibited. If the KMS prefix is incorrect, it will not be decrypted correctly. It is recommended to keep it in the returned form.
ncpkms:v1:XjsPWPjqPrBi1N2DupSiSbX/ATkGmKA
--------- -------------------------------
KMS prefix ciphertext
Response example
{
"code": "SUCCESS",
"msg": "",
"data":{
"ciphertext": "ncpkms:v1:gsYccPMkd/fAtqbKuj2ov4H+EdZC8Qb/b1GPIIN2Z61+yULo"
}
}
Errors
Response code | Response message |
---|---|
FORBIDDEN | "Forbidden" |
INTERNAL_SERVER_ERROR | "Server internal error" |
UNPROCESSABLE_ENTITY | "Invalid status" |
INVALID_REQUEST | "Invalid request" |
UNAUTHORIZED | "Unauthorized" |
NOT_FOUND | "Not found" |
INVALID_STATUS | "Invalid status" |
Was this article helpful?