This is an archive version of the document. To get the most up-to-date information, see the current version.

Getting Virtual Machines

This section explains how to get a list of virtual machines.

Request

GET https://<hostname>/api/v1/virtualMachines

Request Headers

The request header must contain an authorization token of the current session.

Request Parameters

None.

Request Body

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 200 (OK).

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the response body message: application/json; charset=utf-8

Response Body

Property

Type

Description

offset

integer

Shows the offset value.

limit

integer

Shows the offset limit.

totalCount

integer

Shows the number of records in the results array.

results

Results Object

Contains the result object.

_links

Dictionary of string [key] and Object [value]

Links to related resources (navigation property).

Results Object

Property

Type

Description

id

string

Shows the identification number of the virtual machine.

azureId

string

Shows the identification number of the azure account.

name

string

Shows the name of the virtual machine.

azureEnvironment

string

Shows the name of the azure environment.

osType

string

Shows the operation system.

regionName

boolean

Shows the region to which the virtual machine belongs.

totalSizeInGB

integer

Shows the total size of VM virtual disks in Gb.

vmSize

string

Shows the size of the VM.

virtualNetwork

string

Shows the identification number of the virtual network.

subnet

string

Shows the name of the subnet.

publicIP

string

Shows the public IP address.

privateIP

string

Shows the pvate IP address.

isController

boolean

Shows if the VM is acting as the controller server on which Veeam Backup for Microsoft Azure is installed.

_links

Dictionary of string [key] and Object [value]

Links to related resources (navigation property).

Example

Request:

GET https://abc.ukwest.cloudapp.azure.com/api/v1/virtualMachines

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

  "offset": 0,

  "limit": 30,

  "totalCount": 64,

  "results":    [

           {

        "id": "pc3pw96xdfiigtuo1fkiy7h3d49nw4otuh9hkiqnzmjdbf4refoy",

        "azureId": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/teamcity-abc/providers/microsoft.compute/virtualmachines/09d9b9cb-387c-4878-8d59-7fbf08dfc3bf",

        "name": "09d9b9cb-387c-4878-8d59-7fbf08dfc3bf",

        "azureEnvironment": "Global",

        "osType": "Linux",

        "regionName": "eastasia",

        "totalSizeInGB": 31,

        "vmSize": "Standard_B1s",

        "virtualNetwork": "09738dc7-a5a6-4fd8-a44c-6a0a4112a74a",

        "subnet": "subnet1",

        "publicIP": "52.229.202.242",

        "privateIP": "10.4.15.4",

        "isController": false,

        "_links":          {

           "subscription": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809"},

           "resourcegroup": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/resourceGroups/1h44ukp5fafbatiuda7z5xyfcxfwfcihg8uofjn4y1zk3d47xhqo"},

           "policies": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/policies?virtualMachineId=pc3pw96xdfiigtuo1fkiy7h3d49nw4otuh9hkiqnzmjdbf4refoy&usn=0"},

           "restorepoints": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/restorePoints?virtualMachineId=pc3pw96xdfiigtuo1fkiy7h3d49nw4otuh9hkiqnzmjdbf4refoy&onlyLatest=False"},

           "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/virtualMachines/pc3pw96xdfiigtuo1fkiy7h3d49nw4otuh9hkiqnzmjdbf4refoy"}

        }

     },

           {

        "id": "komwpubufdyu5m4ipts9hsr3u4tbfwmsitjy8ccacaaag3hfepsy",

        "azureId": "/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809/resourcegroups/teamcity-abc/providers/microsoft.compute/virtualmachines/244467fb-fdde-4ba4-a377-8d59fff8e1e7",

        "name": "244467fb-fdde-4ba4-a377-8d59fff8e1e7",

        "azureEnvironment": "Global",

        "osType": "Linux",

        "regionName": "eastasia",

        "totalSizeInGB": 32,

        "vmSize": "Standard_B1s",

        "virtualNetwork": "6266b38c-ad11-4cfa-80db-433449e84da9",

        "subnet": "subnet1",

        "publicIP": "168.63.218.106",

        "privateIP": "10.4.15.4",

        "isController": false,

        "_links":          {

           "subscription": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/subscriptions/3a9a8330-7bbc-4b03-9c68-15d674fbc809"},

           "resourcegroup": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/cloudInfrastructure/resourceGroups/1h44ukp5fafbatiuda7z5xyfcxfwfcihg8uofjn4y1zk3d47xhqo"},

           "policies": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/policies?virtualMachineId=komwpubufdyu5m4ipts9hsr3u4tbfwmsitjy8ccacaaag3hfepsy&usn=0"},

           "restorepoints": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/restorePoints?virtualMachineId=komwpubufdyu5m4ipts9hsr3u4tbfwmsitjy8ccacaaag3hfepsy&onlyLatest=False"},

           "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/virtualMachines/komwpubufdyu5m4ipts9hsr3u4tbfwmsitjy8ccacaaag3hfepsy"}

        }

     }

  ],

  "_links":    {

     "self": {"href": "https://abc.ukwest.cloudapp.azure.com:443/api/v1/virtualMachines?offset=0&limit=30"},

     "next": {"href": "https://abc.ukwest.cloudapp.azure.com:443/api/v1/virtualMachines?offset=30&limit=30"}

  }

}

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.