use_OpenMpp_CPAC {openmpp} | R Documentation |
OpenM++ CPAC API Connection
Description
Register a connection to the OpenM++ Web Services (OMS) Application Programming Interface (API) running on the CPAC cloud-based server.
Usage
use_OpenMpp_CPAC(
url = Sys.getenv("OPENMPP_CPAC_URL"),
api = Sys.getenv("OPENMPP_CPAC_API"),
user = Sys.getenv("OPENMPP_CPAC_USER"),
pwd = Sys.getenv("OPENMPP_CPAC_PWD"),
...
)
Arguments
url |
URL for making login requests. See |
api |
URL for making API requests. See |
user |
User name for logging into remote API. See |
pwd |
Password for logging into remote API. See |
... |
Not currently used. |
Details
A user
name and password (pwd
) are sensitive information and
should not be shared. To avoid hard-coding your user name and password into
your R scripts, we recommend declaring this information in your global or
project-specific .Renviron
file. The same approach may be used to declare
your URLs for making API requests. While these URLs are typically not
sensitive information, keeping all of this information in one place makes
sense for consistency. For remote API connections to CPAC, set the
following environment variables in your .Renviron
files:
-
OPENMPP_CPAC_URL
: URL for logging into a remote API connection. -
OPENMPP_CPAC_API
: URL for making remote API requests. -
OPENMPP_CPAC_USER
: User name for logging into the remote API connection. -
OPENMPP_CPAC_PWD
: Password for logging into the remote API connection.
Value
Nothing, invisibly. Behind-the-scenes, an instance of the
OpenMppCPAC
R6 class is created. This objects should not be accessed
directly by the user, instead, the package internally uses these
connections to communicate with the OpenM++ API.
Examples
## Not run:
use_OpenMpp_CPAC()
## End(Not run)