I am currently using Rstudio connect version: v1.8.4.2-2. I would like to check on the RStudio Connect API: RStudio Connect API Reference, is this API available this version?
2nd Question: Is the GET /v1/content API available on my RStudio Connect version:v1.8.4.2-2?
I am not able to run the GET /v1/content from the code below:
result <- GET(str_interp("https://testing.com/api/v1/content/${app_guid}"),
# body = data, encode = "raw",
add_headers(Authorization = paste("Key", apiKey))
)
On my own installation of Connect, I can then browse the suggested R code snippet:
library(httr)
apiKey <- "your api key"
result <- GET("https://connect.example.com/__api__/v1/content",
add_headers(Authorization = paste("Key", apiKey)))
I have to guess a little about what's going wrong in your case, but here are a few things you could try:
Check that your URL is correct. The API documentation has the string /__api__/ but in your version you seem to have dropped the underscore characters.
Check that ${app_guid} gets interpolated correctly
Make sure that the apiKey has access to the piece of content you are querying
You don't specify whether you've been able to call any API on your server. If this is the first API call you make, perhaps diagnose step-by-step by calling a simpler API, e.g. GET /v1/content
Hi Andrie,
Yes, I found that my RStudio Connect version does not support for the v1 Server API.
What are the considerations for upgrading the Rstudio connect?
My main concern is: Will the existing deployed shiny apps get affected? Is there any re-work needed for the upgrade?
However, it's really important to make sure you install R side-by-side, as per our recommendations. So take care when you install new versions of R - never use yum update R or apt update R.