Accessing code from published applications on Connect

Follow

Problem

You may wish to access source code for content that's been deployed on Posit Connect. There may be a number of reasons for this, however, it is possible in two(2) different ways.

 

Solution

If the user is not able to login to their account, you can reset the user's password and access their account to view the source code. The graphic below shows how to do so:

 
Alternatively, if you aren't able to access their account, you can get the bundles off of the server itself; the default location is /var/lib/rstudio-connect/apps/. You should see a number of folders there which will correspond to the apps themselves. Depending on which version you are running, Connect may use GUIDs in the URL instead, for example:
http://x.x.x.x/connect/#/apps/9e1a1b34-2583-46cb-a1dc-61bf797fda03/
 
If it does then matching the app to the folder is more difficult. However, you should be able to use the API in that case to grab the bundle:
https://docs.posit.co/connect/api/#get-/v1/content/-guid-/bundles/-id-/download
 
The most straightforward solution is to enable the user account, log in as them, and use the Source Versions menu to download. If that's not possible then you can get the code via one of the methods above, but there is a bit more digging required.

 

Support Ticket

If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly, and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here:

https://support.posit.co/hc/en-us/requests/new

Comments