Skip to content

High availability API Since v0.1 ​

On the standby node, routes that change state answer 409 with the active node's management address. The /v1/ha/ routes and reads stay available on the standby. For the settings, see Management and high availability.

For the base URL, sign-in, roles and error format, see Management API. Except sign-in, a route answers 401 without credentials and 403 when the role is too low.

Routes ​

Pair ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/haviewer, all applicationsReturns the pair status: role, peer and replication state.none
POST/v1/ha/switchoveradmin, all applicationsMakes the standby the active node.none
POST/v1/ha/maintenanceadmin, all applicationsTurns maintenance on or off for this node.Body: on.
POST/v1/ha/join-tokensadmin, all applicationsCreates a token a new node uses to join the pair.none

Diverged versions ​

MethodPathMinimum roleWhat it doesMain fields
GET/v1/config/divergedviewer, all applicationsLists configuration versions replaced when a split healed.none
POST/v1/config/diverged/{n}/applyoperator, all applicationsApplies a diverged version as a new version.Body: hash, comment, dry_run.

Example ​

sh
curl -sk -H "Authorization: Bearer waap_EXAMPLE" https://127.0.0.1:9443/v1/ha

Other interfaces ​

These interfaces are not on the management listener and are not covered by the roles above.

InterfaceWhereWhat it does
POST /v1/local/ha/init, POST /v1/local/ha/token, POST /v1/local/ha/leaveThe node's owner-only admin socketStarts a pair, creates a join token and leaves a pair, for the waap ha commands.
POST /peer/v1/join, POST /peer/v1/heartbeatThe pair's peer listenerUsed by the two nodes of a pair to talk to each other.

For the commands, see High availability CLI.