monitor.contact.bind |
Binds a contact to a monitor. Contacts can receive alerts when the checked server is unavailable or responding not as expected. Authentication & ActionThis method needs authentication. It can be accessed by http and https. Action type: HTTP POST. Arguments
monitor_id (required, see note 1) The id of an existing monitor. Should be an integer. monitor_name (required, see note 1) The name of an existing monitor. Should be a string of max 64 chars. contact_id (required, see note 2) The id of an existing contact. Should be an integer. contact_name (required, see note 2) The name of an existing contact. Should be a string of max 64 chars. delay (not required) The delay before an alert is send. 0=immediately after error is found, 1 = after 1 check, 2 = after 2 checks etc... If the frequence of the monitor is 2 minutes, setting the delay to 3 will send an alert if the server is still on error after 3 checks (so after 6 minutes). Should be an integer. Default = 0 alert_type (not required) There are 2 types of alerts. 'a' = alert on error, 'r' = alert on error AND when server is available again. Allowed values: a = on error only / r = on error and when available again. Default: a
NOTE 1: For ease of use, it is possible to use both monitor_id and monitor_name as a key. If both are present, the monitor_id is taken as the key.
NOTE 2: For ease of use, it is possible to use both contact_id and contact_name as a key. If both are present, the contact_id is taken as the key. Example Requesthttp://api.webcron.org/monitor.contact.bind
contact_id=1983&monitor_id=52319&delay=2&alert_type=r
Example Response<rsp status="ok"> <bind contact_id="1983" monitor_id="52319" /> </rsp> |