API Documents
Documentation API Documents Modify a Monitor

Modify a Monitor

1. API Description

This API (Monitor.Modify) is used to modify a monitor.
Domain name for API request:https://dnsapi.cn/Monitor.Modify
HTTP request method: POST

2. Request Parameters

The table below lists only the API request parameters. Common request parameters are required when the API is called. For more information, please see Common Request Parameters.

Parameter Required Description
monitor_id yes Monitor id. Mandatory parameter.
port yes The port number to monitor like 80. Mandatory parameter.
monitor_interval {60 180 360
monitor_type {http https} yes
monitor_path yes The path in the http header like “/”. Mandatory parameter.
points yes The points to use.Split by ”,”.You can choose it from the list of your own grade. Mandatory parameter.
bak_ip yes Backup IP address.
host no The host from the http header like “www.dnspod.com”. Mandatory parameter.
keep_ttl {yes no} no
sms_notice no “me” for the owner,and “share” for the shared users.Split by ”,” if there are more than one like “me,share”. Mandatory parameter.
email_notice no Same as the sms_notice.
less_notice {yes no} no
callback_url no The callback URL.All the data will be sent to this URL when the IP is down.For more details,please see the directions.Optional parameter.
callback_key no The callback key.If “callback_url” is set up,you should set this up too for security.

bak_ip Backup IP address.Choose one kind from the list blow:

  1. pass Just monitoring,no switching.
  2. pause The old type of pause.For more details,please visit: D监控切换规则
  3. pause2 The intelligent pause who pause the record immediately when the IP is down.
  4. auto Switch intelligently.
  5. IP addresses split by ”,”.

3. Response Codes

Only the response codes related to this API are listed below. For other response codes, please see Common Return Codes.

Response Code Description
7 Invalid monitor id.
8 Invalid host.
9 Invalid monitor port number that range from 1 to 65535.
10 Invalid monitor type.
11 Invalid monitor path.
12 Invalid monitor interval.
13 Invalid monitor points.
14 Too many points.
15 Invalid backup IP.
16 Invalid backup url.
17 Invalid backup IP.
18 Invalid sms notice.
19 Invalid email notice.
22 Invalid callback URL.

4. Sample

curl -X POST https://api.dnspod.com/Monitor.Modify -d 'user_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&domain_id=2317346&monitor_id=51fc9a20-363c-11e2-bab7-0819a6248970&port=80&monitor_type=http&monitor_path=/&monitor_interval=360&points=ctc,cuc,cmc&bak_ip=pass'

The following is a sample response:

  • JSON:
    "status": {
        "code": "1",
        "message": "Action completed successful",
        "created_at": "2012-11-24 21:41:31"
Last updated on 2020-12-23 03:47

DNSPod Technical Community

Sharing & discussions

Scan using WeChat

Official WeChat group

Join WeChat group to chat and feedback

Scan using WeChat