uptimerobot.monitor.responses: Get response times for one or more monitors

Description Usage Arguments Details Value Author(s) See Also Examples

Description

uptimerobot.monitor.responses returns a dataset with all the response times for the given monitors IDs.

Usage

1
uptimerobot.monitor.responses(api.key, monitors, limit = 50, offset = 0)

Arguments

api.key

A valid key for connecting to UptimeRobors public API.

monitors

vector or comma-delimited string with the IDs of the monitors to get.

limit

An integer value used for pagination. Defines the max number of records to return in each page. Default and max. is 50.

offset

An integer value to set the index of the first monitor to get (used for pagination).

Details

The API uses pagination and returns no more than 50 monitors on each page. Use limit and offset to set a different number of monitors to get on each page and to move between pages. Leave default values to get all the data.

Value

A dataset with the response times for the given monitors.

Author(s)

Gabriele Baldassarre

See Also

uptimerobot.monitors, uptimerobot.monitor.logs, uptimerobot.monitor.contacts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# Let's assume the api.key is available into the environment variable KEY
api.key <- Sys.getenv("KEY", "")

# Returns all the monitors IDs. Since the function always return a data.frame
# (even if you ask only for a column), you have to reference the column to get a character vector.
monitors.id <- uptimerobot.monitors(api.key, fields="id")$id

# Returns all the ping events for the given monitors
logs.df <- uptimerobot.monitor.responses(api.key, monitors=monitors.id)

## End(Not run)

uptimeRobot documentation built on May 2, 2019, 2:48 p.m.