VMware Cloud Community
SRZC
Contributor
Contributor

Requesting more than 1000 vms in REST API

Hello,

I am currently developing monitoring for some stats of vCenter such as VMS, hosts, and so on.

According to the documentation​ the limit of VMs returned by one API call is 1000.

Returns information about at most 1000 visible (subject to permission checks) virtual machines in vCenter matching the vcenter.VM.filter_spec.

Unfortunately I have to resort to retrieving a list of hosts and filtering VMS by those hosts because of the possibility of my users to have more than 1000 VMs on all their hosts.

Even with this solution there could be some VMs left unlisted if a single host has a huge amount of VMs.

Is there a way to remove that limit or to use pagination to get a complete list of all VMs?

1 Reply
daphnissov
Immortal
Immortal

You seem to be running into a very rare corner case due to scale. With that being the case, it's probably best to open a case with GSS and get some detailed, technical answers.