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=someTokenValueUsing 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:
It would also be interesting
- Cloud Anti-Spam for online web appsSpam protection for online apps or custom-built sites This guide is for app developers who run...
- CleanTalk Anti-Spam check_message API MethodCleanTalk Anti-Spam "check_message" API method description This method is the best to use on forms that...
- CleanTalk API methods. Anti-Spam, Block Lists, Dashboard (Outdated)CleanTalk APIs This guide is outdated! Please use this instead https://cleantalk.org/help/api-main CleanTalk...
Copied to clipboard