Learn R Programming

uptimeRobot (version 1.0.0)

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

Description

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

Usage

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).

Value

A dataset with the response times for the given monitors.

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.

See Also

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

Examples

Run this code
## 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)

Run the code above in your browser using DataLab