1.0
1.0
post /v1/kms/openapi/datakey/{key_id}
Description
Generates a new key and the value encrypted with key(Purpose: encryption/decryption).
State ACTIVE (DEPRECATED)
| Version | Supported Until |
|---|---|
| 1.0 | 20251231 |
Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| path | key_id required | Resource id of KMS key Example : 138c2fc8c29a449dbfa8681f8f1d78e2 | string | None |
| body | body required | DatakeyRequest |
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | DatakeyResponse |
| 400 | Bad Request | None |
| 401 | Unauthorized | None |
| 403 | Forbidden | None |
Example HTTP request
Request path
/v1/kms/openapi/datakey/{key_id}
Request header
"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = kms 1.0"
Request body
{
"key_type": "plaintext"
}
Example HTTP response
Response 200
{
"ciphertext": "vault:v283:YiUpW1bpF2fMY0VR33aQpik781Ul2gFPsfdwsypwouccHtPSfRaE40wTHHl4a5AK",
"key_version": 1,
"plaintext": "oTvvEkE7q0WM2S5yfGFz5nqe32QMlrCVnqssmDPu6fA="
}