CleanTalk Anti-Spam "monitoring_services_update" API method description
This method is used to update parameters of already existing website monitoring services.
For it to work, the user must have an active monitoring license with available slots remaining.
Request
Data JSON Example
{
"method_name": "monitoring_services_update",
"user_token": "your_user_token",
"monitor_ids": "123,456",
"http_method": "GET",
"status": "PAUSE",
"checks_interval": "120",
"email_notification_delay": "900",
"checkpoints": "1,18"
}
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_update". |
user_token | User token. To obtain a token please get an account here |
monitor_ids |
One or several monitor IDs (can be found in Uptime Monitoring control panel) |
Additional parameters
These parameters can be used to customize your monitor.
Parameter | Explanation |
---|---|
http_method | The method that will be used to retrieve data from checkpoints. Supported types are HEAD and GET |
status | Must be ACTIVE or PAUSE |
check_interval | Frequency of checks in seconds. Possible values: 60, 120, 180, 300, 600, 900, 1800, 3600 |
email_notification_delay |
Delay before sending email notification in seconds. Possible values: 0, 60, 300, 900, 1800, 3600 |
checkpoints |
Identifiers of specific checkpoints to use when monitoring this service (no more than 2 at a time). List of checkpoints: 1: Frankfurt |
Response
Response example
The server's response is independent of the platform.
{
"data": {
"monitors": {
"0": {
"monitor_id": 123,
"operation_status": "SUCCESS"
},
"1": {
"operation_status": "FAILED'",
"operation_message": "Same URL already exists in your list. Please choose another one",
"operation_code": "6"
}
}
}
}
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_update&monitor_ids=123,456&user_token=someTokenValue
Using PHP
PHP backend
<?php $url = "https://api.cleantalk.org/?method_name=monitoring_services_update&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
- 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 methodsCleanTalk API methods This article describes public API methods by CleanTalk for spam and bot checking,...
- CleanTalk Anti-Spam monitoring_services_get API MethodCleanTalk Anti-Spam "monitoring_services_get" API method description This method returns list of resources...