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 ( "_" ).