Black Friday promo up to -50% Time left:

Failover settings

Description

Failover settings for a specific record for which you have activated DNS Failover & Monitoring service.


 Parameters

Name Data Type Status Description
auth-id or sub-auth-id or sub-auth-user Integer Required Authentication parameter
auth-password String Required Authentication parameter
domain-name String Required Domain name containing the record
record-id String Required Record ID. You can see this ID with the method List records 

Return: Status and status description if Failover is not activated or an array with current settings.


Errors

When the authentication of API user is not correct, any API request will fail with the following status and statusDescription:

{"status":"Failed","statusDescription":"Invalid authentication, incorrect auth-id or auth-password."}

If you have entered an invalid or non-existent domain name,the following status will be returned:

{"status":"Failed","statusDescription":"Missing domain-name"}

If the entered Record ID is invalid, the following status will be returned:

{"status":"Failed","statusDescription":"Invalid record-id param."}

Note: These are example errors in JSON format, and these are not the only errors that can be displayed.


Example call

URL JSON: https://api.cloudns.net/dns/failover-settings.json
POST/GET: auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=32
POST/GET: sub-auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=32

URL XML: https://api.cloudns.net/dns/failover-settings.xml
POST/GET: auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=32
POST/GET: sub-auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=32


Example response

{
  "check_type":1,
"check_settings":[],
"status":1,
"down_event_handler":0,
"up_event_handler"0,
"main_ip":"127.0.0.1",
"backup_ip_1":"",
"backup_ip_2":"",
"backup_ip_3":"",
"backup_ip_4":"",
"backup_ip_5":""
"state": "1"
}

Where:

  • check_type is the ID of the check type as it is described in the Activate failover method
  • check_settings is contains an array with the custom settings required for some types of monitoring (HTTP, DNS, TCP and so on), these are the optional parameters in the Activate failover method
  • status is the current state of the monitoring check:
    • -1 : UNKNOWN
    • 0 : DOWN
    • 1 : UP
    • 2 : UNCONFIRMED DOWN
    • 3 : DOWN, INCLUDING ALL BACKUPS
  • down_event_handler is the ID of the event handler when the check become down, as it is descried in the Activate failover method
  • up_event_handler is the ID of the event handler when the check become back up, as it is described in the Activate failover method
  • backup_ip_X are the backup IPs, if you are using event handler whcih activates backup IPs which are working
  • state is the Monitoring State status. 0 stands for Pause, and 1 for Active. 

 


Last modified: 2020-11-16
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more