Last modified on January 19, 2018

AlertSite provides a programming interface for gathering report data for monitors. Among the reports available from the Performance Reports section of the console, the following reports are available through the report API:

The Report API interface communicates with data sources, called endpoints, that correspond to the different report types. The reports require different selection parameters for data collection requests, depending on a report type. All requests are sent over a secure HTTPS connection.

The AlertSite Report Center in the console returns a pre-formatted URL for the Site Detail report, Site Status report, SLA Detail report, and Page Objects report. See Report Center API Command below for more information.

There are 2 versions of the API, version 1 and version 2. This section details each report API request, which parameters are accepted, and whether they are required or optional, for each API version.

API Commands

Each request uses the following format:

https://www.alertsite.com/report-api/{endpoint}/{customer_id}?{report_parameters}

where {endpoint} is one of:

Endpoint Description
detail Detail report.
objects Fullpage Objects report (individual HTTP objects).
outage Outage report.
sitestatus Site Status report.
sla SLA Detail report.
txndetail Transaction Detail report (to event level).
usage Usage report.

The endpoint corresponds to reports available in the AlertSite console Report Center.

The txndetail endpoint sends all data about specified monitors, but does not include individual HTTP objects. The separate objects endpoint is provided for that purpose.

Tip: objects data latency is very high compared to txndetail data.

The {customer_id} is found in the Account > Manage Account screen in the upper left, just below the company name.

The two versions of the API, Version 1 and Version 2, are referenced as report parameter api_version=<n>. The default is api_version=1. To use Version 2, you must include api_version=2 as a parameter.

Report parameters are delimited by '&', for example:

...?obj_device=114349&obj_location=63&rdate=LastWeek&sort_order=desc

In all cases, a date parameter is required, either rdate or start_date+end_date.

The list of all current location IDs are available on the Monitoring Locations page.

Report Center API Command

The Report Center in the AlertSite Console returns a pre-formatted URL for the following reports:

  • Detail
  • Site Status
  • SLA Detail
  • Page Objects

After generating one of these reports from the Performance Reports screen, the Report Options page will include the link Report API - generate report externally. Click this link to bring up a dialog window with the command to run the report via the Report API.

The example below shows the general syntax of the API command using the program wget, but similar programs can also be used, as long as the expected parameters are included:

wget -O test.xml --http-user=ACCOUNT_USERNAME --http-passwd=ACCOUNT_PASSWORD
'https://www.alertsite.com/report-api/detail/CUSTID?obj_device=OBJDEVICE&location=LOCATION
&rdate=DATERANGE&showrecs=SHOWRECS&showsubaccounts=SHOWSUBACCOUNTS&sort_order=ORDER'

The https: command within single quotes must appear as a single line with no spaces.

All the parameters in the URL above, except ACCOUNT_PASSWORD, will be provided once you run the report. ACCOUNT_USERNAME and ACCOUNT_PASSWORD in the command line above are your AlertSite account login ID and password. Any program used to access the URL will need to authenticate with the account login ID and password.

You can manually modify the following parameters:

  • locations
  • rdate
  • showrecs
  • showsubaccounts
  • sort_order

The alternative method to generate this XML report provided by Report Options shows the same URL that can be accessed directly from a browser:

https://www.alertsite.com/report-api/detail/CUSTID?obj_device=OBJDEVICE&locations=LOCATION&rdate=DATERANGE&
showrecs=SHOWRECS&sort_order=ORDER

The command must appear as a single line with no spaces.

See Also

AlertSite APIs