Appearance
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
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/ha | viewer, all applications | Returns the pair status: role, peer and replication state. | none |
POST | /v1/ha/switchover | admin, all applications | Makes the standby the active node. | none |
POST | /v1/ha/maintenance | admin, all applications | Turns maintenance on or off for this node. | Body: on. |
POST | /v1/ha/join-tokens | admin, all applications | Creates a token a new node uses to join the pair. | none |
Diverged versions
| Method | Path | Minimum role | What it does | Main fields |
|---|---|---|---|---|
GET | /v1/config/diverged | viewer, all applications | Lists configuration versions replaced when a split healed. | none |
POST | /v1/config/diverged/{n}/apply | operator, all applications | Applies 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/haOther interfaces
These interfaces are not on the management listener and are not covered by the roles above.
| Interface | Where | What it does |
|---|---|---|
POST /v1/local/ha/init, POST /v1/local/ha/token, POST /v1/local/ha/leave | The node's owner-only admin socket | Starts a pair, creates a join token and leaves a pair, for the waap ha commands. |
POST /peer/v1/join, POST /peer/v1/heartbeat | The pair's peer listener | Used by the two nodes of a pair to talk to each other. |
For the commands, see High availability CLI.