API Command: set_failover_role
The set_failover_role command sets the failover role of a B Series Appliance to either primary or backup.
The API account used to issue this command must have full access to the command API.
Required Parameter for set_failover_role
role=[string] |
The role to assign to this B Series Appliance. Can be either primary or backup. |
Optional Parameters for set_failover_role
data_sync_first=[boolean] |
To perform a data sync with the peer B Series Appliance before failing over, set this to 1. All users on the existing primary B Series Appliance will be disconnected during the data sync, and no other operations will be available until the swap is complete. To fail over without a final data sync, set this to 0. |
force=[boolean] |
This option is only applicable when contacting the primary B Series Appliance and attempting to set its role to backup. If this is set to 1, then this B Series Appliance will become the backup even if the peer B Series Appliance cannot be contacted. |
XML Response for set_failover_role Query
<success> |
If a data sync is being performed first, returns a message of Successfully started data sync. Role change will occur upon successful completion. Otherwise, returns a message of Successfully changed role. |
<error> | Returns an error message if the role was not set successfully. |
Query Examples: set_failover_role
Set failover role to primary |
https://access.example.com/api/command?action=set_failover_role&role=primary |
Set failover role to backup |
https://access.example.com/api/command?action=set_failover_role&role=backup |
Set failover role to primary and perform a data sync |
https://access.example.com/api/command?action=set_failover_role&role=primary&data_sync_first=1 |
Set failover role to backup and perform a data sync |
https://access.example.com/api/command?action=set_failover_role&role=backup&data_sync_first=1 |
Set failover role to backup even if the primary B Series Appliance cannot be contacted |
https://access.example.com/api/command?action=set_failover_role&role=backup&force=1 |
Set failover role to backup even if the primary B Series Appliance cannot be contacted, and perform a data sync |
https://access.example.com/api/command?action=set_failover_role&role=backup&data_sync_first=1&force=1 |