When boot volumes are backed up, information about the hardware of the hosts where that volume resides are also stored.
This API call allows obtaining that hardware information. This information can be compared with the configuration of the host on which the user wishes to restore the specified revision and identify whether the two match.
The configuration of the host can be obtained via the "Obtaining settings of a registered Hyper-V host" API call.
This API can be used for validating the available restore options, particularly the firmware type and restrictions of the OsVersion parameter.
The restore operation performs the same validations.
Input Parameters
The input parameter is a numeric revision id, obtained via get volume revisions API call (or the get volumes in case of the latest revision).
The id in the following example is the integer id of the revision chosen to restore.
{
"id": "revision_id_here"
}
Output Parameters
The following table provides the parameters and descriptions.
Parameter | Description |
cores | Integer. CPU cores. |
memorySize | Integer. Memory size. |
osVersion | String. (version format) - os version. This return value can be used for validations, as can be seen in the Restore API validation section. |
is64Bit | Boolean. This return value can be used for further validating what options are available during the Restore operation: If true, and Uefi Boot volumes have been selected for restore (see Get volumes API), and if OsVersion < 6.2 (which means is Windows 7 or Windows server 2008 R2 or lower), restore cannot be done. Message: "Boot volumes from 64-bit versions of Windows Server 2008 R2 or Windows 7 cannot be restored using EFI." If false, and the firmware type chosen in the Restore as VM API call is Uefi, restore is prevented. Error message: "UEFI is only supported on 64-bit operating systems." Note: Restore firmware type is the firmware option chosen at restore time in the restore API, which is either Bios or Uefi. This type should not be confused with the boot volumes being Uefi, which is determined separately from the revision metadata by calling the Get volumes API (it means that the backed-up volume was Uefi). |
Example POST
GET /v2/accounts/test_acc/computers/0000/restore/diskimage/standard/hardwareinfo
Input Parameters
The input parameter is a numeric revision id, obtained via get volume revisions API call (or the get volumes in case of the latest revision)
Output Parameters
Response status: 200 Accepted (for online operation)
Example Response
{
"cores":: 0,,
"memorySize":: 0,,
"osVersion":{: {
"major":: 0,,
"minor":: 0,,
"build":: 0,,
"revision":: 0,,
"majorRevision":: 0,,
"minorRevision":: 0
} },}"is64Bit":true: true }}