ExportKey() Parent topic

Description

Obtain the device key for a virtual machine.

Interface

https://[SecureCloudService]/broker/API.svc/v3.5/vm/{imageGUID}/device/{deviceGUID}/keyfile
Method: POST

Parameter

Parameter
Data Type
Description
Required?
imageGUID
GUID
The GUID of the virtual machine.
Yes
deviceGUID
String
The GUID of the device.
Yes

Request

Refer to the following data type: DeviceKey.

Response

Expected HTTP response code: 200 (OK)
Refer to the following data type: DeviceKey.

Example Request URL

[POST]
https://ms.sample.securecloud.com/broker/API.svc/v3.5/vm/
      639F2224-637D-49AA-876B-AFBAD59AFADA/device/
      e95eb822-c3eb-41f6-93c0-ec13a09500c7/keyfile

Example Request Message

<?xml version="1.0" encoding="utf-8"?>
<deviceKey deviceGUID="e95eb822-c3eb-41f6-93c0-ec13a09500c7"
      passPhrase="P@ssw0rd" />

Example Response

<?xml version="1.0" encoding="utf-8"?>
<deviceKey version="3.5" deviceGUID="e95eb822-c3eb-41f6-93c0-ec13a09500c7">
      <keyFileList>
            <keyFile fileName="E95EB822-C3EB-41F6-93C0-EC13A09500C7.xml">
                  <fileContent>Key file binary</fileContent>
            </keyFile>
      </keyFileList>
</deviceKey>