Using the REST API, the current status of a cOS Core HA cluster can be retrieved. The information is sent back by cOS Core in JSON format and consists of the values that might also be provided by using the cOS Core CLI ha command.
Sending the Request
To retrieve the HA cluster information, an HTTP GET should be sent with the following URI to one of the peers in the cluster:/api/oper/ha
The GET has no optional parameters.
The Information Retrieved
The following information will be retrieved from the responding firewall:If the unit is configured to be a peer in an HA cluster.
If the peer is currently the active cluster member.
How long the peer has been the active cluster member in seconds.
If the peer has been configured as the master or the slave unit in the cluster.
If the other cluster peer is considered to be alive and functioning.
An Example JSON Reply
Below is an example of a typical JSON reply:{ "error":false, "enabled":true, "status": { "active":true, "time":8, "role":0, "role_description":"master", "peer":{"alive":false} } }