Skip to main content
Question

How can I get proviosned vCPU and memory with API??

  • March 10, 2020
  • 2 replies
  • 2088 views

Forum|alt.badge.img+1

Hi,

I want to get these numbers with API call.

What is the best way to achieve this?

Thanks

This topic has been closed for replies.

2 replies

JeremyJ
Nutanix Employee
Forum|alt.badge.img+4
  • Nutanix Employee
  • March 10, 2020

I don’t see anything from the REST API Explorer which would do this directly.

You could fetch the per-VM details for all VMs with an API call, probably vm get with projection for CPU and memory stats you want, then total it up by software.


Forum|alt.badge.img+1
  • Author
  • Adventurer
  • March 11, 2020

@JeremyJ 

Agree.

I believe the % will require also to get the # of CPUs from the host/cluster and then do the math.

→ Total VMs CPUs ÷ Total Host/Cluster CPUs

Cheers!