This is the multi-page printable view of this section. Click here to print.
Encrypt Data
1 - 1.1
post /v1/kms/openapi/encrypt/{key_id}
Description
Encrypts the provided plaintext(base64 encoded) using key(Purpose: encryption/decryption)
State ACTIVE (CURRENT)
| Version | Supported Until |
|---|---|
| 1.1 | - |
Parameters
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| path | key_id required | Resource id of KMS key Example : 138c2fc8c29a449dbfa8681f8f1d78e2 | string | None |
| body | body required | EncryptRequest |
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | EncryptResponse |
| 400 | Bad Request | None |
| 401 | Unauthorized | None |
| 403 | Forbidden | None |
Example HTTP request
Request path
/v1/kms/openapi/encrypt/{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.1"
Request body
{
"plaintext": "dGhlIHF1aWNrIGJyb3duIGZveAo="
}
Example HTTP response
Response 200
{
"ciphertext": "vault:v283:YiUpW1bpF2fMY0VRh3aQpik781Ul2gFPsfdwsypwouccHtPSfRaE40wTHHl4a5AK",
"key_version": 1
}
2 - 1.0
post /v1/kms/openapi/encrypt/{key_id}
Description
Encrypts the provided plaintext(base64 encoded) using 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 | EncryptRequest |
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | OK | EncryptResponse |
| 400 | Bad Request | None |
| 401 | Unauthorized | None |
| 403 | Forbidden | None |
Example HTTP request
Request path
/v1/kms/openapi/encrypt/{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
{
"plaintext": "dGhlIHF1aWNrIGJyb3duIGZveAo="
}
Example HTTP response
Response 200
{
"ciphertext": "vault:v283:YiUpW1bpF2fMY0VRh3aQpik781Ul2gFPsfdwsypwouccHtPSfRaE40wTHHl4a5AK",
"key_version": 1
}