Audit Server Content with the RStudio Connect API

In 1.8.6, RStudio Connect administrators have the ability to create reports that track and manage the content on their servers. If you’ve ever wanted the answers to questions like:

You’re not alone. We’ve had a flood of requests for making the APIs for accessing this information publicly available. Using an API key and the content enumeration endpoint, RStudio Connect administrators can now build custom reports to answer all these questions and more.

RStudio Connect Server API Showcase

Visit the RStudio Connect Server API Showcase for access to code examples and template reports that can be deployed straight to Connect.

Content Enumeration API

Retrieve detailed information about the content that is available on your Connect instance using the GET /v1/content/ endpoint. Administrators can retrieve all content items regardless of visibility and permissions.

Example Content Audit Report

Read more about content enumeration in the RStudio Connect API Cookbook.

Content Permissions API

This set of endpoints will let you manage the user permissions associated with a content item:

These permissions are used when the content item’s access_type is acl (Access Control List).

Example Content Access Audit Report

Read more about managing content access in the RStudio Connect API Cookbook.

Vanity Auditing and Management APIs

All RStudio Connect content receives a URL that includes its numerical ID at the time of deployment. Administrators and publishers (if allowed) can create “vanity paths” for content which make the content available at an additional, customized URL.

GET /v1/vanities can be used to list all defined vanity URLs on a server. You must have an API key with administrator privileges to call this endpoint.

Example Vanity URL Audit Report

In addition to auditing vanity URLs, there are also API methods for setting and deleting vanities on individual content items:

If Authorization.PublishersCanManageVanities is enabled, publishers can set and delete the vanity URL for content items that they have permission to change. Otherwise, administrator permissions are required.

Read more about content organization and vanity URL management in the RStudio Connect API Cookbook.

Tag Auditing and Management APIs

Tags are the primary content organization concept available in RStudio Connect. Tags and content items have a many-to-many relationship: any content item may be associated with multiple tags, and any tag may be associated with multiple content items. This gives you the flexibility to group and organize your content in whatever way best suits your organization.

The new tag API endpoints introduce management tools for tags as well as their associations with content items.

Tag and Tagged Content Auditing:

Example Tag Usage Audit Report

Read more about content organization and tag management in the RStudio Connect API Cookbook.

RStudio Connect 1.8.6

  • Return to the general announcement post to learn about more features and updates here.
  • For upgrade planning notes, continue reading more here.