CleanTalk Anti-Spam "monitoring_services_delete" API method description

This method is used to delete resources from the Uptime Monitoring service.

Request

Data JSON Example

{
  "method_name": "monitoring_services_delete",
  "monitor_ids": "123,456"
}

Data Processing

Necessary information about the data processing.

Parameter Explanation
HTTP Method GET or POST
Data format JSON
URL https://api.cleantalk.org

Required Parameters

These parameters are required.

Parameter Explanation
method_name Must be "monitoring_services_delete".
user_token User token. To obtain a token please get an account here
monitor_ids

Identifiers of the monitors to be deleted

 

Response

Response example

The server's response is independent of the platform.

{
  "data": {
    "monitors": {
      "0": {
        "monitor_id": 123,
        "operation_status": "SUCCESS"
      },
      "1": {
        "monitor_id": 456,
        "operation_status": "FAILED'",
        "operation_message": "Monitor not found",
        "operation_code": "21"
      }
    }
  }
}

Response Explanation

Key Explanation
monitors List of monitors with operation results
monitor_id Monitor ID, provided if the operation has succeeded
operation_status Status of the operation, SUCCESS or FAILED
operation_message Error description in case of failure
operation_code Error code in case of failure

Code Examples

Using Wget

CLI example

wget -O- https://api.cleantalk.org/?method_name=monitoring_services_delete&monitor_ids="123,456"&user_token=someTokenValue
 

Using PHP

PHP backend

                                
<?php $url = "https://api.cleantalk.org/?method_name=monitoring_services_delete&monitor_ids="123,456"&user_token=someTokenValue"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Use true in production $response = curl_exec($ch); $responseString = "Response:\n" . $response"; curl_close($ch);

 

Related Links

Available features related to the method:

Was this information helpful?

It would also be interesting

Copied to clipboard