Automating Snapshots


Create a Snapshot#

Create Snapshots

You can create snapshots with the CLI, Node.js API, HTTP Site API or GraphQL API.

calibre site create-snapshot --site=<site> --ref=<ref>
Example Response#
 Snapshot created: 1588
ParameterRequiredDescription
siteYesThe site slug
refNoA reference identifier (e.g. commit SHA or version number)

List Snapshots#

Read Sites

You can list Snapshots with the CLI, Node.js API, GraphQL API or by using the HTTP Site API.

calibre site snapshots --site=<site> --count=<count> --cursor=<cursor>

Snapshot Status#

The status of the Snapshot will be one of:

  • scheduled: the Snapshot has been scheduled, no tests are running.
  • running: at least one test is running.
  • verifying: at least one test is being verified.
  • errored: all tests completed, and at least one test errored or failed.
  • completed: all tests completed successfully.

Download Snapshot artifacts#

Read Page Tests

For each Snapshot, Calibre stores the following information:

  • lighthouse.json
  • screenshots
  • video render
  • HAR file
  • all other metrics and data available through the interface

You can download Snapshot artifacts with the CLI. Files will be saved to snapshot-artifacts directory.

CLI
calibre site download-snapshot-artifacts --site=<site> --id=<id>

Delete a Snapshot#

Delete Snapshots

You can delete a Snapshot with the CLI, Node.js API or GraphQL API.

calibre site delete-snapshot --site=<site> --id-<id> --confirm
Example Response#
 Snapshot deleted: 42

Retrieve a Snapshot#

See the Retrieving Metrics guide for more details.

On this page