Black Friday SALE - Up to -30% OFF Time left:

Modify failover

Description

Modify Failover for a specific record


 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 
check_type Integer Required

Monitoring check types for this Failover:

  • 1 - Ping (15% threshold)
  • 2 - Ping (25% threshold)
  • 3 - Ping (50% threshold)
  • 4 - HTTP
  • 5 - HTTPS
  • 6 - HTTP custom string
  • 7 - HTTPS custom string
  • 8 - TCP
  • 9 - UDP
  • 10 - DNS
down_event_handler Integer Required

Event handler if Main IP is down:

  • 0 - Monitoring only, email notification
  • 1 - Deactivate DNS record
  • 2 - Replace with working Backup IP 
 up_event_handler Integer Required

Event handler if Main IP is up:

  • 0 - Monitoring only, email notification
  • 1 - Activate the Main IP for the DNS record
  • 2 - Do not monitor if it is back up
main_ip String Required Main IP address which will be monitored
backup_ip_1 String Required First Backup IP address
backup_ip_2 String Optional Second Backup IP address
backup_ip_3 String Optional Third Backup IP address
backup_ip_4 String Optional Fourth Backup IP address
backup_ip_5 String Optional Fifth Backup IP address
monitoring_region String   Optional

Parameter required if you would like to specify a monitoring region. Possible values:

  • global - Global
  • eur - Europe
  • nam - North America
 
host String Optional Parameter required for HTTP, HTTPS, Custom HTTP, Custom HTTPS and DNS check types. It must contain a hostname (FQDN).
port Integer Optional Parameter required for HTTP, HTTPS, Custom HTTP, Custom HTTPS, TCP and UDP check types. It must contain the port of the server. For TCP/UDP is a port on the Main IP.
path String Optional Parameter for HTTP, HTTPS, Custom HTTP and Custom HTTPS check types. If there is a specific path on the FQDN, it must be filled in this parameter.
content String Optional Parameter required for Custom HTTP and Custom HTTPS check types. In case you require a specific output to be returned, it must be filled in this parameter (e.g. OK).
query_type String Optional Parameter required for DNS check type. It must contain the record type (e.g. A).
query_response String Optional  Parameter required for DNS check type. You must fill in the response of the DNS server for this specific record.
check_period Integer Optional

Time-frame between each monitoring check. Default value is 60 (1 minute). Possible values:

  • 60 - 1 minute
  • 120 - 2 minutes
  • 300 - 5 minutes
  • 600 - 10 minutes
  • 900 - 15 minutes
  • 1200 - 20 minutes
  • 1800 - 30 minutes
  • 3600 - 1 hour
notification_mail String Optional Parameter required for email notifications. If the parameter is not added, the current notifications settings will remain the same.
state Integer Optional Optional parameter for turning your monitoring on pause and vice versa.

Return: Status and message.


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."}

If the value for "check_type" is invalid, the following status will be returned:

{"status":"Failed","statusDescription":"This is invalid monitoring type."}

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


 Example

URL JSON: https://api.cloudns.net/dns/failover-modify.json
POST/GET: auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=1234&check_type=5&host=cloudns.net&port=443&down_event_handler=2&up_event_handler=2&main_ip=127.0.0.1& backup_ip_1=192.168.1.2&check_period=60&notification_mail=example@domain.com, example2@domain.com&state=1
POST/GET: sub-auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=1234&check_type=5&host=cloudns.net&port=443&down_event_handler=2&up_event_handler=2&main_ip=127.0.0.1& backup_ip_1=192.168.1.2&check_period=60&notification_mail=example@domain.com, example2@domain.com&state=1

URL XML: https://api.cloudns.net/dns/failover-modify.xml
POST/GET: auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=1234&check_type=5&host=cloudns.net&port=443&down_event_handler=2&up_event_handler=2&main_ip=127.0.0.1& backup_ip_1=192.168.1.2&check_period=60&notification_mail=example@domain.com, example2@domain.com&state=1
POST/GET: sub-auth-id=0&auth-password=password&domain-name=cloudns.net&record-id=1234&check_type=5&host=cloudns.net&port=443&down_event_handler=2&up_event_handler=2&main_ip=127.0.0.1& backup_ip_1=192.168.1.2&check_period=60&notification_mail=example@domain.com, example2@domain.com&state=1


Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more