Azure VMs

The /virtualMachines resource collection represents Azure VMs that reside in Azure regions selected in backup policy settings and can be protected by Veeam Backup for Microsoft Azure.

Get Collection of Azure VMs

The HTTP GET request to the /virtualMachines endpoint retrieves a list of Azure VMs that can be protected by Veeam Backup for Microsoft Azure.

SecurityBearer
Request
query Parameters
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
SubscriptionId
string or null <uuid>

Returns only Azure VMs that belong to an Azure subscription with the specified ID.

x-veeam-parameter-group: VirtualMachineOptions
ResourceGroupId
string or null

Returns only Azure VMs that belong to a resource group with the specified ID.

x-veeam-parameter-group: VirtualMachineOptions
TenantId
string or null

Returns only Azure VMs that belong to a tenant with the specified ID.

x-veeam-parameter-group: VirtualMachineOptions
ServiceAccountId
string

Returns only Azure VMs to which a service account with the specified system ID has permissions.

x-veeam-parameter-group: VirtualMachineOptions
RegionIds
Array of strings or null

Returns Azure VMs that reside in Azure regions with the specified IDs.

x-veeam-parameter-group: VirtualMachineOptions
SearchPattern
string or null

Returns only those items of a resource collection whose names match the specified search pattern in the parameter value.

x-veeam-parameter-group: VirtualMachineOptions
ProtectionStatus
Array of strings or null (ProtectionStatus)

Returns only Azure VMs with the specified protection status.

Enum: "Unprotected" "Protected" "Unknown"
x-veeam-parameter-group: VirtualMachineOptions
BackupDestination
Array of strings or null (BackupDestinationFilterOptions)

Returns only Azure VMs with the specified backup type.

Enum: "Snapshot" "AzureBlob" "ManualSnapshot" "Archive"
x-veeam-parameter-group: VirtualMachineOptions
ExistsState
string (VirtualMachineExistsState)

Returns only Azure VMs with the specified backup state.

Enum: "OnlyExists" "OnlyDeleted" "Unknown" "All"
x-veeam-parameter-group: VirtualMachineOptions
VmFromProtectedRegions
boolean or null

Defines whether Veeam Backup for Microsoft Azure must return only Azure VMs that reside in regions protected by backup policies.

x-veeam-parameter-group: VirtualMachineOptions
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

get/api/v8/virtualMachines
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/virtualMachines?Offset=0&Limit=-1&SubscriptionId=497f6eca-6276-4993-bfeb-53cbbbba6f08&ResourceGroupId=string&TenantId=string&ServiceAccountId=string&RegionIds=string&SearchPattern=string&ProtectionStatus=Unprotected&BackupDestination=Snapshot&ExistsState=OnlyExists&VmFromProtectedRegions=true' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}

Azure VMs Rescan

The HTTP POST requests to the /virtualMachines/rescan endpoint launches a rescan operation for Azure VMs in Microsoft Azure environment.

SecurityBearer
Request
query Parameters
Offset
integer <int32> >= 0

Specifies the first N items of a resource collection that will be excluded from the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Limit
integer <int32> >= -1

Specifies the maximum number of items of a resource collection that will be returned in the response.

x-veeam-parameter-group: Veeam.Azure.REST.RequestQuery.V2.PageProperties
Request Body schema: application/json
subscriptionId
string or null <uuid>
resourceGroupId
string or null
tenantId
string or null
serviceAccountId
string
regionIds
Array of strings or null
searchPattern
string or null
protectionStatus
Array of strings or null (ProtectionStatus)
Enum: "Unprotected" "Protected" "Unknown"
backupDestination
Array of strings or null (BackupDestinationFilterOptions)
Enum: "Snapshot" "AzureBlob" "ManualSnapshot" "Archive"
existsState
string (VirtualMachineExistsState)
Enum: "OnlyExists" "OnlyDeleted" "Unknown" "All"
vmFromProtectedRegions
boolean or null
Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

post/api/v8/virtualMachines/rescan
Request samples
application/json
{
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "resourceGroupId": "string",
  • "tenantId": "string",
  • "serviceAccountId": "string",
  • "regionIds": [
    ],
  • "searchPattern": "string",
  • "protectionStatus": [
    ],
  • "backupDestination": [
    ],
  • "existsState": "OnlyExists",
  • "vmFromProtectedRegions": true
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "startTime": "2019-08-24T14:15:22Z",
  • "status": "Canceled",
  • "error": {
    },
  • "_links": {},
  • "result": {
    }
}

Export Collection of Azure VMs

The HTTP POST request to the /virtualMachines/export endpoint exports a list of Azure VMs that can be protected by Veeam Backup for Microsoft Azure to a .CSV or an .XML file.

x-veeam-custom-response: true
SecurityBearer
Request
header Parameters
Accept
string or null

Specifies a media type of representation of the exported data. The default value is text/csv media type.

Request Body schema: application/json
virtualMachineIds
Array of strings or null

Specifies the system IDs assigned in the Veeam Backup for Microsoft Azure REST API to the Azure VMs whose data will be exported.

subscriptionId
string or null <uuid>
resourceGroupId
string or null
tenantId
string or null
serviceAccountId
string or null
regionIds
Array of strings or null
searchPattern
string or null
protectionStatus
Array of strings or null (ProtectionStatus)
Enum: "Unprotected" "Protected" "Unknown"
backupDestination
Array of strings or null (BackupDestinationFilterOptions)
Enum: "Snapshot" "AzureBlob" "ManualSnapshot" "Archive"
existsState
string (VirtualMachineExistsState)
Enum: "OnlyExists" "OnlyDeleted" "Unknown" "All"
vmFromProtectedRegions
boolean or null
Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict

post/api/v8/virtualMachines/export
Request samples
application/json
{
  • "virtualMachineIds": [
    ],
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "resourceGroupId": "string",
  • "tenantId": "string",
  • "serviceAccountId": "string",
  • "regionIds": [
    ],
  • "searchPattern": "string",
  • "protectionStatus": [
    ],
  • "backupDestination": [
    ],
  • "existsState": "OnlyExists",
  • "vmFromProtectedRegions": true
}
Response samples
application/problem+json
{
  • "extensions": { },
  • "status": 0,
  • "title": "string",
  • "detail": "string",
  • "type": "string"
}

Get Azure VM Data

The HTTP GET request to the /virtualMachines/{id} endpoint retrieves information on an Azure VM with the specified ID.

SecurityBearer
Request
path Parameters
id
required
string

Specifies a system ID assigned to an Azure VM in the Veeam Backup for Microsoft Azure REST API.

query Parameters
sync
boolean or null

Defines whether to force rescanning of the Microsoft Azure infrastructure before the response.

Responses
200

OK

202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

get/api/v8/virtualMachines/{id}
Request samples
curl -i -X GET \
  'https://123.123.123.123/api/v8/virtualMachines/{id}?sync=true' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "string",
  • "azureId": "string",
  • "name": "string",
  • "azureEnvironment": "Global",
  • "osType": "Windows",
  • "regionDisplayName": "string",
  • "regionName": "string",
  • "totalSizeInGB": 0,
  • "vmSize": "string",
  • "dnsName": "string",
  • "virtualNetwork": "string",
  • "subnet": "string",
  • "publicIP": "string",
  • "privateIP": "string",
  • "hasEphemeralOsDisk": true,
  • "availabilityZone": "string",
  • "isController": true,
  • "isDeleted": true,
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "subscriptionName": "string",
  • "tenantId": "string",
  • "resourceGroupName": "string",
  • "_links": {}
}

Create Snapshots of Azure VMs

The HTTP POST request to the /virtualMachines/takeSnapshot endpoint creates snapshots of the specified Azure VMs.

SecurityBearer
Request
Request Body schema: application/json
required
azureAccountId
string or null

Specifies the system ID assigned in the Veeam Backup for Microsoft Azure REST API to a repository or service account whose permissions will be used to create the snapshots.

object (ManualSnapshotSettings)

Specifies Azure tags that will be assigned to the snapshots.

x-veeam-namespace: Veeam.Azure.REST.Representation.V2
object (BackupItems)

Specifies a list of Azure VMs for which snapshots must be created.

Responses
202

Accepted

400

Bad Request

401

Unauthorized

403

Forbidden

415

Client Error

post/api/v8/virtualMachines/takeSnapshot
Request samples
application/json
{
  • "azureAccountId": "string",
  • "snapshotSettings": {
    },
  • "backupItems": {
    }
}
Response samples
application/json
{
  • "offset": 0,
  • "limit": 0,
  • "totalCount": 0,
  • "_links": {},
  • "results": [
    ]
}