AllVirtualMachinesResource


List virtual machines of the user


Retrieve all the VMs that a user can access in the enterprise, using a single query. This resource supports only GET requests because it is an access point for a group of resources. The VM entities in the response include links that you can use to access the VMs, their virtual datacenters, and their virtual resources.

If you have the appropriate permissions, you can also retrieve VMs through infrastructure, either at the top level or per physical machine.

Cloud admins may need to use the switch enterprise feature because this request only returns VMs in the current enterprise

GET https://example.com/api/cloud/virtualmachines

Roles : [ROLE_VDC_ENUMERATE, ROLE_VDC_MANAGE_VAPP, ROLE_VAPP_CUSTOMISE_SETTINGS, ROLE_VAPP_ASSIGN_NETWORK, ROLE_VAPP_PERFORM_ACTIONS, ROLE_VAPP_DEPLOY_UNDEPLOY, ROLE_VAPP_CREATE_STATEFUL, ROLE_VAPP_ASSIGN_VOLUME, ROLE_MANAGE_HARD_DISKS, ROLE_VAPP_CREATE_INSTANCE]

Parameter Type Default Value Description
vdc String Filter by virtual datacenter name
vapp String Filter by virtual appliance name
fqdn String Filter by virtual machine fqdn
vmname String Filter by virtual machine name
vmlabel String Filter by vmlabel
startwith Integer 0 Number of the page to start from
by String name Ordering parameter, by default ordered by name
has String Name filter
limit Integer 25 Number of items to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
scalinggroupmaster Boolean If true, only return virtual machines with the master role in a scaling group

Accept : virtualmachines

Error Codes

  • QUERY-0 - Invalid 'by' parameter

Example