Hi everyone, I need some help.
I'd like to see the output of several Prism Element API calls in the Nutanix/ESXi hypervizor environment.
curl -ks -u 'user:pass' -X GET 'https://<prism_element_ip>:9440/PrismGateway/services/rest/v2.0/cluster'
curl -ks -u 'user:pass' -X GET 'https://<prism_element_ip>:9440/PrismGateway/services/rest/v2.0/hosts'
curl -ks -u 'user:pass' -X GET 'https://<prism_element_ip>:9440/PrismGateway/services/rest/v2.0/vms?include_vm_disk_config=true&include_vm_nic_config=true'
We are developing a monitoring/reporting tool for multiple platforms. We have recently added support for Nutanix as well. It works fine with AHV but we don't have access to a Nutanix/ESXi config.
Thanks and regards,
Best answer by AnishWalia20
API v3 is currently not supported on ESXi clusters, whereas API v2 works just fine and are exactly the same as it works on AHV clusters.
Below are some of the useful links:
1) for the VM: https://www.nutanix.dev/reference/prism_element/v2/api/vms/get-vms-getvms/
2) Cluster: https://www.nutanix.dev/reference/prism_element/v2/api/cluster/get-cluster-getclusterinfo/
3) Hosts: https://www.nutanix.dev/reference/prism_element/v2/api/hosts/get-hosts-gethosts/
All this can be found here: https://www.nutanix.dev/reference/prism_element/v2/api