Inciar sesión





¿Olvidó su contraseña?

monitor.logs

Returns logs of a monitor with status information, response times and exact date and time in the timezone set in your profile.

Authentication & Action

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

Action type: HTTP GET.

Arguments

id (required)

The id of one monitor.

error (not required)

Whether to return only error logs or only logs without error. Don't use this parameter if you want all logs (error and no error). Allowed values: 0 = no errors / 1 = only errors

status_code (not required)

Show only logs with a certain status code (HTML or FTP). Allowed values: any status code

station (not required)

Comma separated list of monitor station id's. Limit logs to certain stations. Allowed values: integer and existing id's. Default: all stations

from (not required)

Date or DateTime string. Shows logs from this date. The format is: yyyymmdd or yyyymmddhhmmss, all attached. We use the timezone you have set in Your Profile. Default: 24 hours ago

until (not required)

Date or DateTime string. Shows logs until this date. The format is: yyyymmdd or yyyymmddhhmmss, all attached. We use the timezone you have set in Your Profile. NOTE: Maximum timespan between from and until is 7 days. If you need logs from a longer period, make multiple calls.

page (not required)

The pagenumber of returned data. Allowed values: any integer

perpage (not required)

The max. number of logs returned. Allowed values: any integer. The maximum value is 1000.

 

IMPORTANT: The dates and times used and returned by this method are in the same timezone as set in Your Profile. Once you change this timezone, the dates and times in returned logs will change too!

Example Request

https://api.webcron.org/monitor.logs/id:1234/from:20110901000000/until:20110901235959

Example Response

<rsp status="ok" total="3" page="1" perpage="1000">
   <logs monitor_id="1234" name="my monitor" match="no" check_hash="no">
      <log id="7465738465" date="2011-09-01 00:01:02" station="10" file_size="7041">
         <status error="0" status_code="200"/>
         <response_time resolve="210" connect="30" first_byte="40" transfer="273" total="553"/>
      </log>
      <log id="7465739821" date="2011-09-01 00:21:03" station="2" file_size="7041">
         <status error="0" status_code="200"/>
         <response_time resolve="189" connect="42" first_byte="38" transfer="373" total="642"/>
      </log>
      <log id="7465740758" date="2011-09-01 00:41:02" station="11" file_size="7041">
   <status error="0" status_code="200"/>    <response_time resolve="353" connect="207" first_byte="212" transfer="889" total="1661"/>       </log>    </logs> <rsp>