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


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> [...]


Authorizations are role based. The built-in roles are:




Can do anything.


Can only manage the R server: R process and R packages. Creating and using R sessions is not permitted.


Can only create and use its own R sessions. R operations may be limited by the AppArmor Configuration.


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.