Server API Guide

Posit Package Manager offers a Swagger UI view, which follows the OpenAPI Specification to document the commonly requested endpoints.

Versioning of the API

The Package Manager API is considered stable, and is versioned alongside the server version. The documented endpoints are subject to change between releases. Review the release notes for a particular version for any breaking changes.

Pagination

Endpoints that return a list of results accept two query parameters, both of which begin with an underscore:

Parameter Description
_limit The maximum number of results to return.
_page The page of results to return, where one page is _limit results.

Package Manager ignores query parameters it does not recognize. It therefore answers a request that pages using a different spelling, such as offset, limit, page, or per_page, with the first page of results and reports success, rather than returning an error. When paging through a large result set, confirm that successive responses differ from one another.

_limit defaults to the [API].DefaultApiResultsLimit setting, which is 100. Package Manager reduces a larger value to the [API].MaxApiResults setting, which is 1000. For more information, refer to the API configuration settings in the appendix.

_page counts from 1, except that _page=0 also returns the first page. The second page is _page=2, the third _page=3, and so on. Package Manager rejects a negative _page or _limit with an error.

Some endpoints use their own defaults and limits in place of the configured ones. The Server API Guide documents the values that apply to each endpoint.

Disabling the Server API Guide

If you’d like to disable access to the Server API Guide, edit the configuration property [Swagger].Enabled as follows:

/etc/rstudio-pm/rstudio-pm.gcfg
[Swagger]
Enabled = false

For more information, refer to the Swagger configuration settings in the appendix.

Back to top