Inciar sesión





¿Olvidó su contraseña?

monitor.edit

Edit an existing monitor.

Authentication & Action

This method needs authentication. It can be accessed by http and https.

Action type: HTTP POST.

Arguments

id (see note 1)

The id of the monitor.

name (see note 1)

The name of the monitor. Allowed value: string(64)

url (required)

The url of the monitor. Allowed value: string(2048)

group_id (not required)

The id of the group this monitor should be added to. Id should be an integer of an existing group.

group_name (not required, see note 2)

The name of an existing group this monitor should be added to. name should be an integer with max 64 chars.

status (not required)

The status of the monitor. Allowed values: 1 = enabled / 0 = disabled.

port (not required)

The port number of the check. Allowed value: integer

login (not required)

The username needed to access the resource (http authentication). Allowed value: string(32)

password (not required)

The password belonging to above username. Allowed value: string(32)

match (not required)

Webcron will check if this string is found (or not found, depending on the value of "contain") in the server response. Allowed value: string(255)

contain (not required)

Determines if above "match" value should occur or not in server response. Allowed value: 1 = should occur / 0 = should not occur.

do_hash (not required)

Checks if a resource has changed, by comparing the MD5 hash. If you want to replace an existing value, set this value to 1. Allowed value: 1 = check hash / 0 = don't check.

frequence (not required)

The frequence between two checks, in minutes. Allowed values: 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 15 / 20 / 25 / 30 / 35 / 40 / 45 / 50 / 55 / 60 Default: 1

post (not required)

Any data that should be posted (by way of an HTTP POST). The format should be: pie=apple&drink=coffee&desert=none

stations (not required)

Comma separated list of monitor station id's that will monitor. Allowed values: integer and existing id's. Default: all stations

add_stations (not required)

Add new (future) stations automatically to the list of stations. Allowed values: 1 = yes / 0 = no. Default: 1

header(not required)

Header to be included in request. For multiple headers, use header[]=Cookie:myCookieThing&header[]=Accept:text/plain

 

NOTE 1: It is possible to use both id and name as a key. If both are present, the name is ignored as key. It may be clear that you can not change the name if you use the name as a key!

 

NOTE 2: It is possible to use both group_id and group_name to add this monitor to a group. If both are present, the group_name is ignored.

 

All available arguments will overwrite existing values. If for example, you don't send a  frequence, the currently set frequence will be left unchanged.

Example Request

http://api.webcron.org/monitor.edit
POST data:
id=74978&status=0&frequence=3

Example Response

<rsp status="ok">
   <monitor id="74978" modified="2009-02-26 19:23:06" />
</rsp>