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

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."
    }
}

Get release readme

Get the README content for a specific release.

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

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."
    }
}

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

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, such as 3.x

Response

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