uptimerobot.monitor.delete: Delete a monitor

Description Usage Arguments Value Author(s) Examples

Description

uptimerobot.monitor.delete remove a monitor and all existing statistics of it.

Usage

1

Arguments

api.key

string with a valid key for connecting to Uptimerobot API.

id

numeric or integer with the ID of the monitor to delete.

Value

The function returns TRUE in case success. An error is thrown otherwise.

Author(s)

Gabriele Baldassarre

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
 # Let's assume the api.key is available into the environment variable KEY
 api.key <- Sys.getenv("KEY", "")

 # Create a monitor and get its monitor.id
 monitor.id <- uptimerobot.monitor.new(api.key,
   friendly.name="Open Analytics",
   url="https://gabrielebaldassarre.com", type="http"
 )

 # Change the friendly name of the monitor
  if(uptimerobot.monitor.edit(api.key,
     monitor.id,
     friendly.name="Open Analytics - gabrielebaldassarre.com"
  ){
   message("Monitor has been successfully edited!")
 }

 # Delete the just-made monitor
 if(uptimerobot.monitor.delete(api.key, monitor.id){
   message("Monitor has been successfully deleted!")
 }

## End(Not run)

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