uptimerobot.monitor.contacts: Get contacts informations for one or more monitors

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

Description

uptimerobot.monitor.contacts return a dataset with all the alert contacts that will be triggered when a log is collected for the given monitors IDs.

Usage

1
uptimerobot.monitor.contacts(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 alert contacts.

Author(s)

Gabriele Baldassarre

See Also

uptimerobot.monitors, uptimerobot.monitor.logs, uptimerobot.monitor.responses

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 contacts registered for the given monitors
logs.df <- uptimerobot.monitor.contacts(api.key, monitors=monitors.id)

## End(Not run)

theclue/uptimeRobot documentation built on May 31, 2019, 9:12 a.m.