Deployment shiny application under same url with connect api with curl

Hi,

right now, I am deploying the shiny apps to the Rstudio Connect with help of curl and connect API. How can I ensure that, when I am redeploying Shiny application, it will be deployed under the same URL? I am using approximately the same code from this repo : https://github.com/rstudio/connect-api-deploy-shiny/blob/master/deploy/create-upload-deploy.sh. Thank you in advance for your help.

Regards,
Tomas

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Hey @tomasj7 ! So sorry for the delay responding to you here!

There are definitely ways to ensure that you deploy the application to the same "endpoint" over and over again (thereby meaning all app configuration, ACLs, vanity URLs, logs, etc. persist between deployments).

The key that I think will get you unblocked is the "NAME" field, which in this example script is randomized (thereby meaning a new deployment each time):

By changing that NAME variable to something deterministic, you should be good to go!!

Documentation on the topic just landed in our latest release here: https://docs.rstudio.com/connect/api/#post-/v1/experimental/content

name*: string A simple, URL-friendly identifier. Allows alpha-numeric characters, hyphens ( "-" ), and underscores ( "_" ).