Getting Virtual Machines by Machine ID
This section explains how to get a list with properties for the specified virtual machine.
Request
GET https://<hostname>/api/v1/virtualMachines/{id} |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameters must be posted as URL.
Parameter | Description |
id | The identification number of the virtual machine. Can be obtained as described in Getting Virtual Machines. |
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 |
|---|---|---|
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/pc3pw96xdfiigtuo1fkiy7h3d49nw4otuh9hkiqnzmjdbf4refoy
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "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"} } } |