Skip to content

Baselines

The server keeps an immutable, versioned baseline history per (repository, target). All routes require client credentials and are scoped to the authenticated repository.

POST /api/v1/baselines

Upload a baseline snapshot for a target. A new version is created only when the content digest changes; an identical re-upload is deduped.

Request body

json
{
  "target": "home-page",
  "kind": "web",
  "snapshot": { "...": "canonicalized snapshot JSON" },
  "screenshot": "<base64 PNG, optional>"
}

Responses

  • 201 Created — a new version was stored. Body includes the version and "deduped": false.
  • 200 OK — content was unchanged; existing version returned with "deduped": true.
  • 400 Bad Request — invalid JSON or payload.
  • 402 Payment Required — the write is blocked by a hard plan limit (snapshot or storage quota) or a past-due account (managed billing mode).
  • 413 Payload Too Large — body exceeds the limit.

GET /api/v1/baselines

List the repository's baseline targets with their latest version.

http
200 OK
{ "targets": [ { "target": "home-page", "latestVersion": 7, "kind": "web", ... }, ... ] }

GET /api/v1/baselines/:target

Full version history for one target. 404 if the target has no baselines.

http
200 OK
{ "target": "home-page", "versions": [ { "version": 7, "digest", "createdAt" }, ... ] }

GET /api/v1/baselines/:target/latest

The latest version for a target, including its snapshot (and screenshot if present). 404 if none exists.

GET /api/v1/baselines/:target/versions/:version

A specific historical version, including its snapshot. version must be a positive integer (400 otherwise); 404 if that version doesn't exist.

Source-available: CLI under FSL-1.1-ALv2, cloud server under BUSL-1.1. See Licensing.