Introduction.

The package can be downloaded only by registered users by clicking on the button below.

Once you click the download button. you will be asked to enter your API key (you can locate your API key on your 'My Account' page).




Authentication Required
Send email with download link
   Warning

After entering your API key, please save the downloaded TAR.GZ file to a convenient folder.


Installing the package

From R Studio:

Select the “Install” option from the packages tab (below), change “Install from” menu option to “Package Archive file” type. Next click on the “Browse” button to select the saved Monitor+ installation and then click the “Install” button to begin.


To manually install:

Launch R to the R command prompt
Type: install.packages( [path_to_tar.gz_file], repos = NULL )     // Where [path_to_tar.gz_file] is the location of the R package.
E.g: install.packages("C:\idm-r\idmmonitor-r.tar.gz", repos = NULL)

The package is installed from a “tar” file and requires the “HTTR”, “R6” and “JSONLITE” packages to be installed prior to use. The “HTTR” package allows direct communications with the Monitor+ API, the “R6” provides data classes used in the package and JSONLITE allows easy use of the JSON script in “R”.



Testing the package

Once the four packages have been installed (see above), you are ready to begin testing. You will need your Monitor+ API key to complete this next stage. You should have received your API key from us via email. If you have a problem locating the API key, you can access your API key by logging into https://www.sarus.com and viewing your account.

To begin you need to enable the "idmmonitor" package, register your API key and get a session token from the remote API server. You need to type the three commands below to achieve this. The commands you must type are in black text below, comments are in green text and results from the server are in blue.


# Enable the library

> library(idmmonitor)

Loading required package: R6
Loading required package: jsonlite
Loading required package: httr


# Register your API key with the service

> idata.set_api_key("XXXXX-XXXXX-XXXXX-XXXXX")

Stored the new API key XXXXX-XXXXX-XXXXX-XXXXX.


# Get a session token

> idata.get_session_token()

A new token 2b4a1038338c9b4234a1a8c5cc01ba3d has been set.
>

Once you have successfully entered the commands above and have a “new” session token, you can access the full service. As you can see from the example above, commands to the "idmmonitor" package are prefixed with the text “idata.”.

You can use the commands below test access the server

>idata.query_session_token()
[1] 1796000

> idata.get_api_address()
The API server is set to https://api.sarus.com/


Testing the connection

You can quickly check that the connection to the Monitor+ API server is working. Open your browser and enter the url https://api.sarus.com/ and press enter. Your browser should show a simple web page with one line of text similar to ”Monitor+ Web API Version: X.X”.

If you do not see this (or you see an error page), you may have a proxy or firewall issue that is blocking the connection. Please contact your IT department and ask them to replicate the test above to enable access to the Monitor+ API server for you.

You can also try to connect to the web site where the API help files are stored. Open your browser and enter the url https://www.sarus.com/api-docs and press enter. If you do not see the Sarus web site, please contact your IT department and ask them to replicate test above. They should be able to quickly resolve the issue.


And Finally

For any other issues, please email support@sarus.com with a subject of “Monitor+ R Package Support”. Please send your contact details, User Reference Number, API key, R version number, any relevant screenshots and a description of the issue. We will do our best to get a speedy resolution for you.