amsLogin
Login or Logout of an AMS System

Description

Login (authenticate) or logout of an AMS System.

Usage

amsLogin(url, user, password, port = 2185, force = TRUE, readonly = FALSE)
amsLogout(url, apiToken, port = 2185)
amsSessionInfo()

Arguments

url a character value, the host url for the AMS.
user a character value, the user name for the login.
password a character value, the password for the user.
port an numeric value, the port for connecting to the AMS. The default value of 2185 if the port number used in the default AMS installation.
force a logical value, if TRUE (the default), an exising login for user will be overridden.
readonly a logical value, if TRUE, a readonly login session will be created, even if there already is a login session for user.
apiToken a character value, the API token to connect to the AMS. The default is cached value created when amsLogin was called.

Details

Upon a successful login, the url, port, and an apiToken are cached for the session. These values will be used by other functions on the AMS package by default.
A warning will be issued if the return status is not 200 (success).
Value
for amsLogin, a list with components:
body a character vector with the body of the results from the connection to the AMS. This is in JSON format.
status an integer return code from the connection to the AMS. A value of 200 indicates a successful operation.
headers a character vector containing the headers returned from the connection to the AMS.
For amsSessionInfo, a named vector with the cached values of url, port, user, and apiToken.
Examples
## Not run: 
zlogin <- amsLogin("http://localhost", "fakeuser", "fakepassword")
amsSessionInfo()
zlogout <- amsLogout()
## End(Not run)
Package AMS version 6.1.4-13
Package Index