connectapi
connectapi copied to clipboard
Trigger rendering with parameters
:wave: thanks for this amazing package. So useful.
This is a great workflow to trigger a render of an rmarkdown document. However I can't see any way to trigger that rendering with parameters. So in a typical workflow we might do:
rmarkdown::render("report.Rmd", params = list(var1 = "val"))
and in my head I'd expect something like this to work:
connectapi::variant_render(rmd_content_variant, params = list(var1 = "val"))
So my question is, is there a path to passing parameters to a remote call of a parameterized report?
Howdy @boshek ! Thanks so much for reaching out here, and we are very glad to hear that the package has been useful for you!!
I love that API idea! We are definitely leaning this direction, but there is unfortunately nothing like this available in the public (or private!) Connect API today. We are working on some things that will move us that direction, though, so we will keep this open for when it lands! 😄
https://community.rstudio.com/t/using-the-variants-endpoint-to-create-new-variants/139952
Thanks for the response @colearendt. I think a parallel feature here would be the ability to create variants and save them in RStudio connect. AFAIK variants can only be created via pointing and clicking.
Yes, unfortunately point+click is the only way to create variants today 😞 You are exactly right that those are related, and that is exactly the direction we are hoping to head 😄