DiskManagement

Before you restore volumes to a Veeam Agent computer or a recovery appliance, you prepare the disks of the host in a disk management session: Veeam Backup & Replication loads the live disk layout of the host, and you map the disk layout of the backup onto it.

First, initialize disk management for the host and the restore point, and keep the session alive while you work. Then map the backup layout onto the host layout automatically or manually: apply the backup layout or the layout of an original disk to a target disk, and apply changes such as creating, removing, resizing and restoring partitions. You can also erase disks, check the size limits of a partition before you resize it and unlock BitLocker-protected volumes. To discard subsequent modifications later, create a checkpoint and revert to it when needed. To detect disks that became visible to the host after the session started, refresh the layout; refreshing discards the manual mapping changes made in the session.

To start volume restore with the prepared layout, see the Restore section.

Initialize Disk Management

The HTTP POST request to the /api/v1/diskManagement/init endpoint initializes a disk management session and loads the live disk layout of the host.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
id
required
string <uuid>

Agent or recovery appliance ID.

oibId
required
string <uuid>

Restore point ID. To get the ID, run the Get All Restore Points request.

hostType
required
string (EVolumeRestoreHostType)

Type of host on which the volumes will be restored.

Enum: "Agent" "RecoveryAppliance"
Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/init
Request samples
application/json
{
  • "id": "a1f3c2d4-5e6b-47a8-9c10-2b3d4e5f6a7b",
  • "oibId": "b2e4d3c5-6f70-48b9-ad21-3c4e5f6a7b8c",
  • "hostType": "Agent"
}
Response samples
application/json
{
  • "id": "a1f3c2d4-5e6b-47a8-9c10-2b3d4e5f6a7b",
  • "name": "enterprise01.tech.local",
  • "diskManagementSessionId": "c3f5e4d6-7a81-49ca-be32-4d5f6a7b8c9d"
}

Map Backup Layout to Host Layout Automatically

The HTTP POST request to the /api/v1/diskManagement/automap endpoint automatically maps the backup disk layout of the selected restore point onto the live disk layout of the host.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

mappingType
required
string (EBackupLayoutMappingType)

Type of mapping the backup layout onto the current layout of the host.

Enum: "ToOriginalLayout" "Custom"
Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/automap
Request samples
application/json
{
  • "diskManagementSessionId": "c3f5e4d6-7a81-49ca-be32-4d5f6a7b8c9d",
  • "mappingType": "ToOriginalLayout"
}
Response samples
application/json
{
  • "success": true,
  • "restoreLayout": {
    }
}

Keep Disk Management Session Alive

The HTTP PUT request to the /api/v1/diskManagement/{diskManagementSessionId}/keepAlive endpoint keeps the disk management session active.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

put/api/v1/diskManagement/{diskManagementSessionId}/keepAlive
Request samples
Response samples
application/json
{ }

Get Current Restore Layout of Host

The HTTP GET request to the /api/v1/diskManagement/{diskManagementSessionId} endpoint returns the current restore layout of the host.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

get/api/v1/diskManagement/{diskManagementSessionId}
Request samples
Response samples
application/json
{
  • "id": "d4f6e5c7-8b92-4adb-bf43-5e6a7b8c9da0",
  • "name": "enterprise01.tech.local",
  • "diskManagementSessionId": "c3f5e4d6-7a81-49ca-be32-4d5f6a7b8c9d",
  • "targetLayout": {
    },
  • "sourceLayout": {
    },
  • "volumeMatchingResults": {
    }
}

Apply Backup Layout

The HTTP POST request to the /api/v1/diskManagement/{diskManagementSessionId}/applyBackupLayout endpoint applies the backup disk layout to the specified disk.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
targetDiskNumber
required
integer <int32>

Disk number of the destination disk to apply the layout to.

sourceDiskNumber
integer <int32>

Disk number of the backup disk layout to apply from.

Responses
200

The backup layout has been applied to the disk.

400

Bad request. This error is related to POST and PUT requests. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/{diskManagementSessionId}/applyBackupLayout
Request samples
application/json
{
  • "targetDiskNumber": 0,
  • "sourceDiskNumber": 0
}
Response samples
application/json
{
  • "version": 1,
  • "disks": [
    ]
}

Apply Disk Layout

The HTTP POST request to the /api/v1/diskManagement/{diskManagementSessionId}/applyDiskLayout endpoint applies a disk layout from an original disk to the specified target disk.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
targetDiskNumber
required
integer <int32>

Disk number of the destination disk to apply the layout to.

sourceDiskNumber
required
integer <int32>

Disk number of the backup disk layout to apply from.

Responses
200

The disk layout has been applied from the original disk to the target disk.

400

Bad request. This error is related to POST and PUT requests. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/{diskManagementSessionId}/applyDiskLayout
Request samples
application/json
{
  • "targetDiskNumber": 0,
  • "sourceDiskNumber": 0
}
Response samples
application/json
{
  • "version": 1,
  • "disks": [
    ]
}

Erase Disk

The HTTP POST request to the /api/v1/diskManagement/{diskManagementSessionId}/eraseDisk endpoint erases all partitions and data from the specified disk.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
targetDiskNumber
required
integer <int32>

Disk number of the destination disk to apply the layout to.

sourceDiskNumber
integer <int32>

Disk number of the backup disk layout to apply from.

Responses
200

The disk has been erased.

400

Bad request. This error is related to POST and PUT requests. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/{diskManagementSessionId}/eraseDisk
Request samples
application/json
{
  • "targetDiskNumber": 0,
  • "sourceDiskNumber": 0
}
Response samples
application/json
{
  • "version": 1,
  • "disks": [
    ]
}

Remove Partition

The HTTP POST request to the /api/v1/diskManagement/{diskManagementSessionId}/removePartition endpoint removes a partition from the specified disk.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
targetDiskNumber
required
integer <int32>

Disk number.

liveVolumeId
required
string or null <uuid>

Live volume ID.

required
object (SizeModel)

Size value with a measurement unit.

required
object (SizeModel)

Size value with a measurement unit.

Responses
200

The partition has been removed from the disk.

400

Bad request. This error is related to POST and PUT requests. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/{diskManagementSessionId}/removePartition
Request samples
application/json
{
  • "targetDiskNumber": 0,
  • "liveVolumeId": "e5f7a6b8-9ca3-4bec-c054-6a7b8c9dae1f",
  • "startOffset": {
    },
  • "size": {
    }
}
Response samples
application/json
{
  • "version": 1,
  • "disks": [
    ]
}

Resize Partition

The HTTP POST request to the /api/v1/diskManagement/{diskManagementSessionId}/resizePartition endpoint resizes a partition on the specified disk.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
required
object (PartitionInfoModel)

Disk partition information.

required
object (SizeModel)

Size value with a measurement unit.

Responses
200

The partition has been resized.

400

Bad request. This error is related to POST and PUT requests. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/{diskManagementSessionId}/resizePartition
Request samples
application/json
{
  • "partitionInfo": {
    },
  • "newSize": {
    }
}
Response samples
application/json
{
  • "version": 1,
  • "disks": [
    ]
}

Get Partition Resize Options

The HTTP POST request to the /api/v1/diskManagement/{diskManagementSessionId}/resizePartitionOptions endpoint validates whether the specified partition can be resized and returns the calculated size constraints: minimum, maximum, and current size.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
diskNumber
required
integer <int32>

Disk number where the partition is located.

liveVolumeExists
required
boolean

If true, a live volume exists for the partition.

fsType
required
string (EVolumeFileSystemType)

File system type of the volume.

Enum: "NTFS" "ReFS" "FAT" "FAT32" "HPFS" "CDFS" "UDF" "NWFS" "exFAT" "unknown"
required
object (SizeModel)

Size value with a measurement unit.

required
object (PartitionInfoModel)

Disk partition information.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/{diskManagementSessionId}/resizePartitionOptions
Request samples
application/json
{
  • "diskNumber": 0,
  • "liveVolumeExists": true,
  • "fsType": "NTFS",
  • "size": {
    },
  • "partitionInfo": {
    }
}
Response samples
application/json
{
  • "volumeLabel": "System Reserved",
  • "currentSize": {
    },
  • "maximumSize": {
    },
  • "minimumSize": {
    }
}

Restore Partition

The HTTP POST request to the /api/v1/diskManagement/{diskManagementSessionId}/restorePartition endpoint restores a partition from the original backup disk to the target disk.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
targetDiskNumber
required
integer <int32>

Disk number of the target disk.

targetDiskLogicalSectorSize
required
integer <int32>

Logical sector size of the target disk.

isTargetDiskDynamic
required
boolean

If true, the target disk is dynamic.

required
object (SizeModel)

Size value with a measurement unit.

sourceDiskNumber
required
integer <int32>

Disk number of the original disk to restore from.

sourcePartitionNumber
required
integer <int32>

Partition number of the original partition to restore from.

Responses
200

The partition has been restored from the backup to the target disk.

400

Bad request. This error is related to POST and PUT requests. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

post/api/v1/diskManagement/{diskManagementSessionId}/restorePartition
Request samples
application/json
{
  • "targetDiskNumber": 0,
  • "targetDiskLogicalSectorSize": 512,
  • "isTargetDiskDynamic": false,
  • "targetPartitionStartingOffset": {
    },
  • "sourceDiskNumber": 0,
  • "sourcePartitionNumber": 1
}
Response samples
application/json
{
  • "version": 1,
  • "disks": [
    ]
}

Unlock BitLocker-Protected Volume

The HTTP PUT request to the /api/v1/diskManagement/unlockVolume endpoint unlocks the selected BitLocker-protected volume.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Request Body schema: application/json
required
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

volumeId
required
string <uuid>

Selected volume ID.

keyOrPassword
required
string <password>

Numeric key or password for the locked volume.

Responses
200

Result of the volume unlock attempt.

400

Bad request. This error is related to POST and PUT requests. The request body is malformed, incomplete or otherwise invalid.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

put/api/v1/diskManagement/unlockVolume
Request samples
application/json
{
  • "diskManagementSessionId": "c3f5e4d6-7a81-49ca-be32-4d5f6a7b8c9d",
  • "volumeId": "e5f7a6b8-9ca3-4bec-c054-6a7b8c9dae1f",
  • "keyOrPassword": "St0r@gePass!"
}
Response samples
application/json
{
  • "success": true
}

Create Disk Management Checkpoint

The HTTP PUT request to the /api/v1/diskManagement/{diskManagementSessionId}/createCheckPoint endpoint creates a checkpoint of the current restore layout state so that subsequent modifications can be reverted and discarded.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

put/api/v1/diskManagement/{diskManagementSessionId}/createCheckPoint
Request samples
Response samples
application/json
{ }

Revert to Disk Management Checkpoint

The HTTP PUT request to the /api/v1/diskManagement/{diskManagementSessionId}/revertToCheckPoint endpoint reverts the restore layout state to the previously created checkpoint and discards all modifications made since that point.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Responses
200

Restore layout state after reverting to the checkpoint.

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

put/api/v1/diskManagement/{diskManagementSessionId}/revertToCheckPoint
Request samples
Response samples
application/json
{
  • "version": 1,
  • "disks": [
    ]
}

Refresh Restore Layout of Host

The HTTP PUT request to the /api/v1/diskManagement/{diskManagementSessionId}/refreshLayout endpoint re-reads the disk layout of the host, maps the backup layout to it again and returns the refreshed restore layout. Run this request to detect disks that became visible to the host after the disk management session started, for example, after you installed a storage controller driver. The request discards manual mapping changes made in the session.

Available to: Backup Administrator, Restore Operator. Also available to custom roles that have restore permissions.

SecurityBearer
Request
path Parameters
diskManagementSessionId
required
string <uuid>

Disk management session ID. To get the ID, run the Initialize Disk Management request.

header Parameters
x-api-version
required
string
Default: 1.3-rev3

Version and revision of the client REST API. Must be in the following format: <version>-<revision>.

Responses
200

OK

401

Unauthorized. The authorization header has been expected but not found (or found but is expired).

403

Forbidden. The user sending the request does not have adequate privileges to access one or more objects specified in the request.

404

Not found. No object was found with the path parameter specified in the request.

500

Internal server error. The request has been received but could not be completed because of an internal error at the server side.

put/api/v1/diskManagement/{diskManagementSessionId}/refreshLayout
Request samples
Response samples
application/json
{
  • "id": "d4f6e5c7-8b92-4adb-bf43-5e6a7b8c9da0",
  • "name": "enterprise01.tech.local",
  • "diskManagementSessionId": "c3f5e4d6-7a81-49ca-be32-4d5f6a7b8c9d",
  • "targetLayout": {
    },
  • "sourceLayout": {
    },
  • "volumeMatchingResults": {
    }
}