POST api/OfflineEnvironments/{id}/ExportEncryptedMasterKey
Returns the offline environment master encryption key and the master encryption IV encrypted with the provided RSA-2048 public key.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
The ID of the offline environment to export the master key. |
globally unique identifier |
Required |
Body Parameters
Public key data.
MasterKeyExportInfo| Name | Description | Type | Additional information |
|---|---|---|---|
| PublicKey |
The RSA-2048 public key in the PKCS#1 PEM format to encrypt the master key. |
Collection of byte |
Required |
Request Formats
application/json, text/json
Sample:
{
"PublicKey": "QEA="
}
Response Information
Resource Description
OfflineEnvironmentMasterKey| Name | Description | Type | Additional information |
|---|---|---|---|
| EncryptedMasterEncryptionKey |
The offline environment's master encryption key, encrypted using the provided public key with PKCS#1 padding. |
Collection of byte |
Required |
| EncryptedMasterEncryptionIv |
The offline environment's master encryption IV, encrypted using the provided public key with PKCS#1 padding. |
Collection of byte |
Required |
Status Codes
All HTTP status codes must be expected, but the following status codes are the most probable:
- BadRequest (400) - The offline environment does not support TPM to contain a master key.
- BadRequest (400) - Provided public key is invalid. An RSA-2048 public key is expected.
- NotFound (404) - The offline environment with the specified ID is not found.
Response Formats
application/json, text/json
Sample:
{
"EncryptedMasterEncryptionKey": "QEA=",
"EncryptedMasterEncryptionIv": "QEA="
}