rstudio / connectapi

An R package for interacting with the RStudio Connect Server API
https://pkgs.rstudio.com/connectapi/
Other
42 stars 25 forks source link

Feature request: render content with user-defined parameters #200

Open fh-kpikhart opened 1 year ago

fh-kpikhart commented 1 year ago

In the Connect UI, it is possible to adjust parameters of a report and re-render it, without saving those parameters as a new Variant (Input panel > Run Report button). Is it possible to expose that ad-hoc render capability, with custom parameters, as a connectapi method?

In other words: rmarkdown::render() takes a params argument. Can connectapi's Variant$render() do the same?

As far as I know, Variant$render() only supports rendering a saved Variant. However, creating a new Variant is cumbersome and manual (cannot be done programmatically).

aronatkins commented 1 year ago

Parameters are not configurable nor specifiable using the API. Unfortunately, a Shiny application is currently used for that parameter configuration.

We definitely want to make the entire parameter management lifecycle better.

We are already tracking this feature request internally; it will be included in connectapi once it is is available in the Posit Connect API.

r2evans commented 2 weeks ago

This feature would definitely be useful. The simple use-case is a parameterized rmarkdown document (with or without a "Schedule") that can be rerendered with caller-defined parameters. I need to be able to run this several times over a report-cycle with different parameters, and since I don't use RStudio IDE, I see no way to easily add variants from the caller.