List Cluster
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Returns information about at most 1000 visible (subject to permission checks) clusters in vCenter matching the Cluster.FilterSpec.
Request
URLURL
https://{api_host}/rest/vcenter/cluster
Query Parameters
Query Parameters
filter
Optional
Specification of matching clusters for which information should be returned.
If unset, the behavior is equivalent to a Cluster.FilterSpec with all fields unset which means all clusters match the filter.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Response
Response
Response BodyResponse Body
200 OK returns
ClusterListResponseBody
of type application/json
Commonly used information about the clusters matching the Cluster.FilterSpec.
{
"value": [
{
"cluster": "string",
"drs_enabled": false,
"ha_enabled": false,
"name": "string"
}
]
}
array of
ClusterSummary
value
Optional
Commonly used information about the clusters matching the Cluster.FilterSpec.
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/rest/vcenter/cluster
Errors
401
com.vmware.vapi.std.errors.unauthenticated : if the user can not be authenticated. | com.vmware.vapi.std.errors.unauthorized : if the user doesn't have the required privileges.
503
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
507
com.vmware.vapi.std.errors.unable_to_allocate_resource : if more than 1000 clusters match the Cluster.FilterSpec.
Cluster Operations
get
get