Get 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.
Retrieves the status of a VCHA cluster.
Request
URLURL
https://{api_host}/rest/vcenter/vcha/cluster?action=get
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
VchaClusterGetRequestBody of type application/json (required){
"partial": false,
"vc_spec": {
"active_location": {
"hostname": "string",
"password": "string",
"port": 0,
"ssl_thumbprint": "string",
"username": "string"
}
}
}
boolean
partial
Optional
If true, then return only the information that does not require connecting to the Active vCenter Server. If false or unset, then return all the information. If unset, then return all the information.
vc_spec
Optional
Contains active node’s management vCenter server credentials. If unset, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.
Response
Response
Response BodyResponse Body
200 OK returns
VchaClusterGetResponseBody
of type application/json
Info structure containing the VCHA configuration and health information.
{
"value": {
"auto_failover_allowed": false,
"config_state": "enum",
"health_state": "enum",
"health_warnings": [
{}
],
"manual_failover_allowed": false,
"mode": "enum",
"node1": {
"failover_ip": {
"gateway_ip": "string",
"ip_family": "enum",
"ipv4": {
"address": "string",
"prefix": 0,
"subnet_mask": "string"
},
"ipv6": {
"address": "string",
"prefix": 0
}
},
"ha_ip": {
"gateway_ip": "string",
"ip_family": "enum",
"ipv4": {
"address": "string",
"prefix": 0,
"subnet_mask": "string"
},
"ipv6": {
"address": "string",
"prefix": 0
}
},
"runtime": {
"placement": {
"bios_uuid": "string",
"cluster": "string",
"cluster_name": "string",
"datacenter": "string",
"datacenter_name": "string",
"ha_network": "string",
"ha_network_name": "string",
"ha_network_type": "enum",
"host": "string",
"host_name": "string",
"management_network": "string",
"management_network_name": "string",
"management_network_type": "enum",
"management_vcenter_name": "string",
"management_vcenter_server_guid": "string",
"storage": {
"datastore": "string",
"datastore_name": "string"
},
"vm_name": "string"
},
"role": "enum",
"state": "enum"
}
},
"node2": {
"failover_ip": {
"gateway_ip": "string",
"ip_family": "enum",
"ipv4": {
"address": "string",
"prefix": 0,
"subnet_mask": "string"
},
"ipv6": {
"address": "string",
"prefix": 0
}
},
"ha_ip": {
"gateway_ip": "string",
"ip_family": "enum",
"ipv4": {
"address": "string",
"prefix": 0,
"subnet_mask": "string"
},
"ipv6": {
"address": "string",
"prefix": 0
}
},
"runtime": {
"placement": {
"bios_uuid": "string",
"cluster": "string",
"cluster_name": "string",
"datacenter": "string",
"datacenter_name": "string",
"ha_network": "string",
"ha_network_name": "string",
"ha_network_type": "enum",
"host": "string",
"host_name": "string",
"management_network": "string",
"management_network_name": "string",
"management_network_type": "enum",
"management_vcenter_name": "string",
"management_vcenter_server_guid": "string",
"storage": {
"datastore": "string",
"datastore_name": "string"
},
"vm_name": "string"
},
"role": "enum",
"state": "enum"
}
},
"witness": {
"ha_ip": {
"gateway_ip": "string",
"ip_family": "enum",
"ipv4": {
"address": "string",
"prefix": 0,
"subnet_mask": "string"
},
"ipv6": {
"address": "string",
"prefix": 0
}
},
"runtime": {
"placement": {
"bios_uuid": "string",
"cluster": "string",
"cluster_name": "string",
"datacenter": "string",
"datacenter_name": "string",
"ha_network": "string",
"ha_network_name": "string",
"ha_network_type": "enum",
"host": "string",
"host_name": "string",
"management_network": "string",
"management_network_name": "string",
"management_network_type": "enum",
"management_vcenter_name": "string",
"management_vcenter_server_guid": "string",
"storage": {
"datastore": "string",
"datastore_name": "string"
},
"vm_name": "string"
},
"role": "enum",
"state": "enum"
}
}
}
}
value
Optional
Info structure containing the VCHA configuration and health information.
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"partial":false,"vc_spec":{"active_location":{"hostname":"string","password":"string","port":0,"ssl_thumbprint":"string","username":"string"}}}' https://{api_host}/rest/vcenter/vcha/cluster?action=get
Errors
400
com.vmware.vapi.std.errors.invalid_argument : If the credentials provided for authenticating with the active node's management vCenter server are invalid.
401
com.vmware.vapi.std.errors.unauthorized : If the user has insufficient privilege to perform the operation.
- If partial is false or unset, then the operation execution requires the Global.VCServer privilege.
- If partial is true, then the operation execution requires the System.Read privilege.
403
com.vmware.vapi.std.errors.unverified_peer : If the SSL certificate of the management vCenter server cannot be validated.
The value of the data field of Error will be a structure that contains all the fields defined in CertificateInfo.