uptimerobot.contact.new: Add a new alert contact

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

Description

uptimerobot.contact.new creates a new alert contact with the given properties.

Usage

1
uptimerobot.contact.new(api.key, type, value, friendly.name)

Arguments

api.key

string with a valid key for connecting to Uptimerobot API.

type

string or numeric with the type of the contact. You can use both the value (string) or the index (numeric) here.

value

string with the value of the contact (ie. the email address).

friendly.name

string the friendly (screen) name of the contact.

Details

The alert contacts are whom to be notified when the monitor goes up/down.

The index lookup keys and values are available on the Uptimerobot API page on https://uptimerobot.com/api

Value

The function returns the ID of the newly created contact in case success. An error is thrown otherwise.

Author(s)

Gabriele Baldassarre

See Also

uptimerobot.contacts, uptimerobot.contact.delete

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
 # Let's assume the api.key is available into the environment variable KEY
 api.key <- Sys.getenv("KEY", "")
 # Create a new contact and get the ID
 contact.new <- uptimerobot.contact.new(api.key, type = "email", value = "foo@bar.com", "John Doe")

 # Get informations about this new contact
 contact.detail <- uptimerobot.contacts(api.key, contacts = contact.new)

## End(Not run)

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