HTTP Site API

Our site api allows you to create snapshots and deploys. This is useful as part of a post-deploy, or post-merge hook.

Managing snapshots

The snapshot endpoint is https://calibreapp.com/api/sites/site-slug/snapshots. You can find your site-slug on the Site Settings page.

Creating snapshots using the snapshot endpoint

You can create a snapshot for a site by making a POST request to https://calibreapp.com/api/sites/site-slug/snapshots with the following URL parameters:

  • secret: Your site's secret key (found on the site settings page)
  • ref: A reference for the snapshot (e.g. git hash or tag name)

List snapshots

You can list all snapshots for a site by making a GET request to https://calibreapp.com/api/sites/site-slug/snapshots with the following URL parameters:

  • api_key: Your site's API key (found on the site settings page)
  • page: The page to fetch, default is page 1.
  • limit: The number of snapshots to return per page, default is 50, maximum is 500.

This will return a list of snapshot objects.

Retrieve snapshot

You can retrive a single snapshot for a site by making a GET request to https://calibreapp.com/api/sites/site-slug/snapshots/:id with the following URL parameters:

  • api_key: Your site's API key (found on the site settings page)

This will return a single snapshot object.

Managing deploys

Deploys help you understand how changes impact performance by allowing you to see timeline markers for code deployments.

The deploy endpoint is https://calibreapp.com/api/sites/site-slug/deploys. You can find your site-slug on the Site Settings page.

Creating deploys using the deploy endpoint

You can create a deploy for a site by making a POST request to https://calibreapp.com/api/sites/site-slug/deploys with the following URL parameters:

  • api_key: Your site's API key (found on the site settings page)
  • revision: The source control revision id of the code you are deploying (e.g. git hash or tag name)
  • repository: The base URL of the repository containing the source code being deployed (e.g. https://github.com/calibreapp/app)
  • username: The name of the user who deployed the code

List deploys

You can list all deploys for a site by making a GET request to https://calibreapp.com/api/sites/site-slug/deploys with the following URL parameters:

  • api_key: Your site's API key (found on the site settings page)
  • page: The page to fetch, default is page 1.
  • limit: The number of deploys to return per page, default is 50, maximum is 500.

This will return a list of deploy objects.

Retrieve deploy

You can retrive a single deploy for a site by making a GET request to https://calibreapp.com/api/sites/site-slug/deploys/:uuid with the following URL parameters:

  • api_key: Your site's API key (found on the site settings page)

This will return a single deploy object.