Test Runs API

Test-run endpoints require the test_runs scope. Upload the recording first with the Preview API, then register the result.

Register a run

POST https://peachsim.com/api/v1/test-runs

{
  "kind": "maestro",
  "name": "Checkout flow",
  "status": "passed",
  "owner": "acme",
  "repo": "mobile",
  "branch": "main",
  "commitSha": "...",
  "previewShareId": "...",
  "stepCount": 8,
  "durationMs": 21400
}

kind is maestro or detox. Provide name, prompt, or both. status is stored as passed only when that exact value is sent; other values represent a failed run and may include failureMessage and failedStepIndex.

previewShareId is required and must name a preview that belongs to the authenticated account. The response is { "run": { ... } }; the run includes an absolute previewUrl and traceUrl on https://peachsim.com.

List runs

GET /api/v1/test-runs?owner=acme&repo=mobile&branch=main&kind=maestro&limit=50

owner and repo are required and must identify a repository linked to the authenticated account. Optional filters are branch, kind, status, source, and pr. limit is clamped to 1 through 100. Results are newest first. The response is { "runs": [ ... ] } with the same run shape.