connect | R Documentation |
Creates a connection to Posit Connect using the server URL and an api key. Validates the connection and checks that the version of the server is compatible with the current version of the package.
connect( server = Sys.getenv(paste0(prefix, "_SERVER"), NA_character_), api_key = Sys.getenv(paste0(prefix, "_API_KEY"), NA_character_), prefix = "CONNECT", ..., .check_is_fatal = TRUE )
server |
The URL for accessing Posit Connect. Defaults to environment variable CONNECT_SERVER |
api_key |
The API Key to authenticate to Posit Connect with. Defaults to environment variable CONNECT_API_KEY |
prefix |
The prefix used to determine environment variables |
... |
Additional arguments. Not used at present |
.check_is_fatal |
Whether to fail if "check" requests fail. Useful in rare cases where more http request customization is needed for requests to succeed. |
A Posit Connect R6 object that can be passed along to methods
## Not run: connect() ## End(Not run) # default is to read CONNECT_SERVER and CONNECT_API_KEY environment variables # this example will read TEST_1_SERVER and TEST_1_API_KEY connect(prefix = "TEST_1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.