Skip to content

Repository, analytics & usage

Identify the authenticated repository and read its analytics and current-period usage. All routes require client credentials.

GET /api/v1/repository

Identify the repository the credentials resolve to — used to build deep links to the web review UI.

http
200 OK
{ "repository": { "id", "name", "createdAt" } }

GET /api/v1/analytics

Repository analytics over a window of the most recent runs (default 200): overall pass rate, a per-day trend of runs/failures, and per-target flakiness (failRate, flips, flakeRate). See Cloud server → Analytics for the metric definitions.

http
200 OK
{ "windowRuns": 200, "totals": { "runs", "passed", "failed", "passRate" }, "trend": [ ... ], "targets": [ { "target", "failRate", "flips", "flakeRate" }, ... ] }

GET /api/v1/usage

Current-period usage for the team that owns the repository behind these credentials, with the plan limits it's measured against. Usage is metered only — limits are reported but not enforced here. In a self-hosted server (DUNGBEETLE_BILLING=none, the default) metered is false and every limit is null (unlimited); usage is still tracked for visibility. See Pricing for the plan ladder.

  • period — billing period as YYYY-MM (UTC).
  • snapshots — captures ingested this period (run results + new baseline versions). A monthly flow, reset at the period boundary.
  • storageBytes — current on-disk total of the team's runs + baselines. A level that carries across periods.
  • repos — live repository count for the team. A level, like storageBytes.
  • limitsrepos / storageBytes / snapshotsPerPeriod / retentionDays, each a number or null for unlimited.
  • warnings — dimensions currently at/near a limit, each { dimension, used, limit, status, hard } where status is warning (≥80%) or over (≥100%). Empty when metering is off.
http
200 OK
{
  "period": "2026-06",
  "plan": "free",
  "metered": false,
  "snapshots": 128,
  "storageBytes": 5242880,
  "repos": 3,
  "limits": { "repos": null, "storageBytes": null, "snapshotsPerPeriod": null, "retentionDays": null },
  "warnings": []
}

Storage is a running counter; operators can correct drift on a cron with npm run usage:reconcile, which recomputes each account's storage from the blobs its runs and baselines reference on disk.

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