Description Usage Arguments Value Examples
Connects to a web API endpoint, optionally with authentication. Never store
passwords in script files or type them into the console!!!! Instead, this
function will propmpt you for a password in RStudio, or you can set the
R_PI_PASSWORD environment variable (you could do so using
usethis::edit_r_environ()
). Use pi_connect_public()
to connect to the
OSIsoft public web API endpoint
(to do so, you'll need to set the R_PI_PUBLIC_USER and R_PI_PUBLIC_PASSWORD
environment variables).
1 2 3 4 | pi_connect(endpoint = Sys.getenv("R_PI_ENDPOINT"),
user = Sys.getenv("R_PI_USER"), test = TRUE)
pi_connect_public(test = TRUE)
|
endpoint |
The base URL for the endpoint. |
user |
Username for authentication. |
test |
Use |
A connection object
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.