Listing of keys for parametrized report variants in RStudio Connect

I have some questions related to the thread linked above:

(1) Is it possible to get a listing of the keys for the different report variants of a parametrized report?
(2) Is it possible to get a mapping from parameters to the key

The reply in the thread above suggested opening each variant to get the "vanity plus key" combination for a report variant:

The variant with ticker="MSFT" might have the URL /stocks/vhTapsdut/
...
You can find this "vanity plus key" path by visiting any of your variants and then using the "Open Solo" link in the RStudio Connect dashboard.

Is there a batch way to recover the keys if you have many variants.

Thanks

This is a really great use case! So sorry for the delay in getting back to you!! Unfortunately, there is not a great way to accomplish this using the public RStudio Connect Server API today. However, it is possible to accomplish the first item in your query using an experimental R package called connectapi.

The parameters themselves are unfortunately not stored in an accessible location, so there is no real path to retrieve the parameters today :disappointed:

But I personally am very excited about these types of use cases and am looking forward to sharing this with the product team!!

library(connectapi)

client <- connect()

my_content <- content_item(client, "my-item-guid")

get_variants(my_content)

myvar <- get_variant(my_content, "variant-key")

myvar$get_url()

I hope that helps!! Please let us know if you have any feedback on this workflow and what other components of your workflow are challenging that we could help with inside of Connect!