REST API Introduction
The Rock REST API has different scopes:
Service discovery
R server management
Status/start/stop
R packages management
R sessions management and usage
R operations
File management
R commands management
Authentication
Rock supports only Basic authentication, which consists of a HTTP request’s header field in the form of Authorization: Basic <credentials>
, where credentials is the Base64 encoding of user’s (or application’s) ID and password joined by a single colon :
.
Using cURL, it is as simple as providing the –user option:
curl --user <id>:<password> [...]
Clients
Usage examples provided are based on cURL, a command line client, and rockr a R package. This latter uses the described API slightly differently, as transferred objects are binary serialized R objects instead of JSON ones.
Based on web standards (HTTP, JSON) this API can be used from any programming languages: Opal for instance is a Java application using the Rock services.