Categories
vmware vcd rest api

How to get a VM uuid with the vcenter sphere api 6.7?

I used the following search terms:

  • "get uuid for vcenter vms with vsphere api"
  • "vmware api get vm"
  • "vcenter api get vm with uuid"
  • vcenter api 6.5 6.7 get vm uuid"

API Modernisation

The vSphere API has been modernised as of version 7.0.
If you are on 6.7 and below of vcenter (eg. 6.7.0.48000) then you will still be on the old api.

Check your VSphere api version with on the old api:

GET { vcenter_url }/rest/appliance/system/version

The latest vsphere automation api docs

Query to find anything

https://blogs.vmware.com/vsphere/2012/04/quickly-finding-objects-using-the-vcloud-api-query-service.html

Sources