Public API

Use the public API to access high-level information about a package or release.

Overview

The public API is unauthenticated and can be accessed by anyone.

It provides a set of high-level endpoints for retrieving simple information about a package or release.

Get package readme

Get the README content for a package.

GET https://privato.pub/public-api/{team}/packages/{package}/readme
Copy to clipboard

Parameters:

  • team: The slug of the team (the same as your Privato subdomain).
  • package: The slug of the package.

Response

{
    "data": {
        "readme": "This is the README content of the package."
    }
}
Copy to clipboard

Get release readme

Get the README content for a specific release.

GET https://privato.pub/public-api/{team}/packages/{package}/releases/{release}/readme
Copy to clipboard

Parameters:

  • team: The slug of the team, usually the same as your Privato subdomain.
  • package: The slug of the package.
  • release: The name of a release, usually the GitHub tag name.

Response

{
    "data": {
        "readme": "This is the README content of the package."
    }
}
Copy to clipboard

Get release series readme

Get the latest README content for a specific series of releases.

GET https://privato.pub/public-api/{team}/packages/{package}/releases/series/{series}/readme
Copy to clipboard

Parameters:

  • team: The slug of the team, usually the same as your Privato subdomain.
  • package: The slug of the package.
  • series: The name of a series in MAJOR.x format, e.g. 3.x

Response

{
    "data": {
        "readme": "This is the README content of the package."
    }
}
Copy to clipboard