You retrieve information about the ESXi hosts running in a vCenter Server instance by listing only the ESXi hosts that you are interested in.
To filter the
ESXi hosts on a
vCenter Server instance and get only the ones you want,
use the
GET https://<vcenter_ip_address_or_fqdn>/api/vcenter/host
HTTP request and specify your filter criteria through the query parameters. Combine several filter criteria by including one or more of the following parameters:
- The name or unique identifier of the host.
- Clusters, data centers, or folders that contain the host.
- Connection state of the host which can be one of the following: CONNECTED, DISCONNECTED, or NOT_RESPONDING.
- Power state of the host which can be one of the following: POWERED_OFF, POWERED_ON, or STANDBY.
The request returns a HostSummary JSON object for each host that matches your filter. You can view information for up to 2500 hosts.