Back to top

Connect Server API Reference

The Connect Server API can be used to perform certain user actions remotely. You will need to install a tool or library that can make HTTP requests, such as:

Authentication

Some endpoints require you to identify yourself as a valid RStudio Connect user. It is recommended that you create an API key. See the RStudio Connect User Guide if you need help creating an API key.

API Keys

An API key grants access to some features of your user account. If you lose an API key, you should revoke the key in the RStudio Connect dashboard.

Keep your API key safe. If your RStudio Connect server’s URL does not begin with https, your API key could be intercepted and used by a malicious actor.

Examples:

cURL

curl -H "Authorization: Key XXXXXXXXXXX" \
     https://rstudioconnect.example.com/__api__/v1/server_settings/r

R

library(httr)
apiKey <- "XXXXXXXXXXX"
result <- GET("https://rstudioconnect.example.com/__api__/v1/server_settings/r",
  add_headers(Authorization = paste("Key", apiKey))

Python

import requests
r = requests.get(
  'https://rstudioconnect.example.com/__api__/v1/server_settings/r',
  headers = { 'Authorization': 'Key XXXXXXXXXXX' }
)

Server Settings

R Info

Get R Installation Info
GET/v1/server_settings/r

This endpoint requires authentication and is only available to publisher and administrator roles.

This endpoint returns a list of metadata objects for each installed version of R that RStudio Connect can run.

For examples, please see the RStudio Connect User Guide.

Example URI

GET /v1/server_settings/r
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "installations": [
    {
      "version": "3.2.5"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "installations": {
      "type": "array"
    }
  }
}

Generated by aglio on 30 Mar 2018