Hi @alessap !
Thanks for sharing this! Do you mind saying a bit more about your use case and why you are trying to deploy this product programmatically to RStudio Connect? We always value learning a bit more about why users are attempting to set up these types of workflows. Is this a CI pipeline?
As for the ways to accomplish this today: there are currently no publicly documented endpoints for setting run as user or the report schedule using the RStudio Connect Server API. Those endpoints have also not yet been exposed to the experimental endpoints within connectapi.
That said, it is possible to view and change the runtime settings for an application using the publicly documented Content API:
https://docs.rstudio.com/connect/api/#updateContent
In connectapi, this might look like:
library(connectapi)
creds <- connect()
bnd <- bundle_dir("/path/to/directory")
myapp <- deploy(
connect = creds,
bundle = bnd,
name = "unique-name",
title = "The Title",
access_type = "all",
load_factor = 0.2,
max_conns_per_process = 50,
max_processes = 10,
min_processes = 2
)
# if you want to make edits later
myapp$update(
max_conns_per_process = 100
)