API Documents
Contents
    Loading
Support API Documents Set a Monitor’s Status

Set a Monitor’s Status

1. API Description

This API (Monitor.Setstatus) is used to set a monitor’s status.
Domain name for API request:https://api.dnspod.com/Monitor.Setstatus
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.
status {enabled disabled} yes

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
6 Invalid monitor id.
7 Invalid new status.
8 Please turn the domain on first.
9 Please turn the record on first.

4. Sample

curl -X POST https://api.dnspod.com/Monitor.Setstatus -d 'user_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&monitor_id=03e3b268-3643-11e2-bab7-0819a6248970&status=disable'

The following is a sample response:

  • JSON:
{
    "status": {
        "code": "1",
        "message": "Action completed successful",
        "created_at": "2012-11-24 22:33:20"
    }
}
Last updated on 2020-12-23 09:12