connectapi icon indicating copy to clipboard operation
connectapi copied to clipboard

Trigger rendering with parameters

Open boshek opened this issue 3 years ago • 3 comments

: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?

boshek avatar Jun 14 '22 19:06 boshek

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

colearendt avatar Jul 19 '22 01:07 colearendt

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.

boshek avatar Jul 19 '22 15:07 boshek

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 😄

colearendt avatar Jul 20 '22 00:07 colearendt