connectapi
An R package for interacting with the Posit Connect server API
The connectapi package provides an R client for programmatically interacting with the Posit Connect Server API. It enables developers to manage content, users, groups, and usage data on Posit Connect clusters through R code.
The package handles common deployment workflows like bundling and publishing content, setting vanity URLs, and migrating applications between servers. It supports content management tasks such as updating access permissions, setting thumbnails, and retrieving usage analytics. The client works across all supported Connect versions and provides consistent error handling with version-specific compatibility checks.
Contributors#
Resources featuring connectapi#
David Granjon & Bo Wang @ Novartis | User-friendly, self-serve tools | Data Science Hangout
We were recently joined by David Granjon and Bo Wang, Senior Data Science Experts at Novartis during the Appsilon Shiny Conference.
We learned how their team designs production ready apps for clinical trials, from wireframing activities to automated deployments.
How do you get feedback from users when you don’t hear from them directly?
To know whether the applications are properly used, they use a tracker within Posit Connect. This is basically an application David developed using the Connect API.
With the Connect API, he can see “who is accessing the application, which gives you some insights like which team is using it and how to target support.” If you develop an application for several teams, you can have some insight of which team is using the application the most. If you see one team is using the application 20 times more than another one, maybe you want to invest more people to provide two paths here.
He supplemented this information by developing an R package, shinyHeatmap, to record in-app usage. “Each click is recorded to identify dead zones to refactor design,” he says. “If you have an app no one visits, maybe it’s poorly designed.”
For more information on that Connect API: https://pkgs.rstudio.com/connectapi/
► Subscribe to Our Channel Here: https://bit.ly/2TzgcOu
Follow Us Here: Website: https://www.posit.co LinkedIn: https://www.linkedin.com/company/posit-software Twitter: https://twitter.com/posit_pbc
To join future data science hangouts, add to your calendar here: pos.it/dsh (All are welcome! We’d love to see you!)
Model Monitors and Alerting at Scale with RStudio Connect | Adam Austin, Socure
Deploying a predictive model signals the end of one long journey and the start of another. Monitoring model performance is crucial for ensuring the long-term quality of your work.
A monitor should provide insights into model inputs and output scores, and should send alerts when something goes wrong. However, as the number of deployed models increases or your customer base grows, the maintenance of your monitor portfolio becomes daunting. In this talk we’ll explore a solution for orchestrating monitor deployment and maintenance using RStudio Connect. I will show how applications of R Markdown, Shiny, and Plumber can unburden data scientists of time-consuming report upkeep by empowering end-users to deploy, update, and own their monitors.
Timestamps: 2:01 - Start of presentation 3:43 - About Socure 6:12 - Model performance matters, deployment isn’t the end of the story 7:26 - What is a monitor? 8:55 - What is an alert? 11:00 - Monitor example 18:09 - Firing an alert from RStudio Connect 19:00 - Why monitor from RStudio Connect? 24:33 - How monitoring drives success at Socure 30:00 - Git-backed deployment in RStudio Connect 36:00 - Shiny app that their account managers see 46:00 - Architecture of a monitoring system 56:00 - Connect hot tip System-wide packages 57:00 - Why did we try Connect for monitoring 59:02 - Why do we keep using it for that :)
Resources shared: Blastula package: https://github.com/rstudio/blastula connectapi package: https://github.com/rstudio/connectapi rsconnect package: https://rstudio.github.io/rsconnect/ Intro to APIs blog post: https://www.rstudio.com/blog/creating-apis-for-data-science-with-plumber/
Speaker Bio: Adam Austin is a senior data scientist and RStudio administrator at Socure, a leading provider of identity verification and fraud prevention services. His work focuses on data science enablement through tools, automation, and reporting
Shiny Usage Tracking in Posit Connect
🤔 Who actually used my Shiny app and for how long? ↗️ Is viewership increasing? Did my CEO use it?!
Did you know? Posit Connect can record event-style usage information which is intended to answer questions like this and is accessed via the Posit Connect Server API.
Please note: during the meetup you can ask questions here anonymously as well: rstd.io/connect-meetup-questions
We will walk through several examples for getting started with the Posit Connect usage data designed to help you answer questions like:
Who is visiting my content? What reports are most common? Has viewership increased over time?
During/after the meetup, you can use the GitHub repo to create the dashboard in your own Connect environment as well and schedule the report to be distributed through email (with inline graphics). The goal for this code is that it is generic enough so that you can copy/paste it into your own R session and run it successfully.
In order for the code to work in your environment, you need two pieces of information unique to your enterprise: Posit Connect’s server path A Posit Connect API Key
We’d love to hear your feedback and learn how you have taken this API and created dashboards for your own organizations as well.
Helpful Links: Follow-up thread on community.rstudio.com: https://community.rstudio.com/t/rstudio-connect-usage-data-thread-to-discuss-ideas-improvements/130581 Contribute to open-source examples: https://github.com/sol-eng/connect-usage Posit Connect Server API: https://docs.rstudio.com/connect/api/ Cookbook: https://docs.rstudio.com/connect/cookbook/ R Client: https://pkgs.rstudio.com/connectapi/ Python Client (mostly deployment): https://github.com/rstudio/rsconnect-python/ Cole’s slides: https://github.com/RStudioEnterpriseMeetup/Presentations
If you ever have questions about Posit Connect or any of our professional products, you can use this link to chat with our team: rstd.io/chat-with-rstudio