CI ingest API

POST your test-run summaries from CI. QualityPilot aggregates across runs, tracks grade + flakiness trends, and notifies on regressions.

What's new in v1.1

Two new read endpoints for AI Bug Detective auto-fixes: GET /api/v1/auto-fixes and GET /api/v1/auto-fix-metrics. Same data the dashboard shows, now scriptable from any chart / CLI. Same X-API-Key auth and 60 req/60s rate limit.

Quick start

Use a published reporter — pick your framework on /docs/install. The page below documents the underlying API for anyone writing a custom reporter.

npm install --save-dev @qlens/jest-reporter
npm install --save-dev @qlens/playwright-reporter
pip install qlens-pytest-reporter

Endpoint

POST https://www.qlens.dev/api/v1/test-runs
Content-Type: application/json
X-API-Key: qlens_<your-key>

Payload

{
  "repo": "owner/name",              // required
  "commit": "abc1234",               // optional
  "branch": "feature/x",             // optional
  "framework": "jest",               // jest | vitest | playwright | pytest | ...
  "ciProvider": "github_actions",    // github_actions | gitlab_ci | circleci | ...
  "summary": {
    "total": 142,                    // required
    "passed": 140,                   // required
    "failed": 2,                     // required
    "skipped": 0,
    "flaky": 1,
    "durationMs": 38241
  },
  "cases": [                         // optional, max 10,000 per run
    {
      "suite": "auth/login",
      "name": "rejects invalid password",
      "status": "failed",            // passed | failed | skipped | flaky
      "durationMs": 421,
      "errorMessage": "expected 401, got 500",
      "attempts": 1
    }
  ]
}

Response

202 Accepted
{ "id": "uuid", "accepted": true, "casesStored": 142 }

400  Invalid JSON / missing required field
401  Invalid or missing API key
429  Rate limit exceeded. Retry-After header in seconds.
     X-RateLimit-Limit: 60
     X-RateLimit-Window: 60s
500  Storage failure

Rate limits

Each API key can post up to 60 requests per 60 seconds (sliding window). On 429, respect the Retry-After header — reporters retry automatically.

OpenAPI spec

Machine-readable schema at /api/v1/openapi.json (OpenAPI 3.1, CORS-allowed).

Use cases

Notes

Auto-fix endpoints

Read-only access to the AI Bug Detective pipeline data — same shape as the dashboard. Both endpoints authenticate with the same X-API-Key header and share the 60 req / 60s rate limit per key. See /docs/auto-fix for the feature itself.

List proposals

GET https://www.qlens.dev/api/v1/auto-fixes?repo=acme/app&state=open,merged&limit=25
X-API-Key: qlens_<your-key>

# Response (200)
{
  "fixes": [
    {
      "id": "11111111-...",
      "repoFullName": "acme/app",
      "testName": "rejects invalid password",
      "testSuite": "auth/login",
      "sourceFilePath": "src/auth/login.ts",
      "confidence": 0.84,
      "prUrl": "https://github.com/acme/app/pull/482",
      "prNumber": 482,
      "prState": "open",
      "llmCostUsd": 0.0007,
      "createdAt": "2026-04-19T09:13:45Z"
    }
  ],
  "counts": { "pending": 0, "running": 1 }
}

Filters: repo (single owner/name), state (comma-separated subset of open,merged,closed,broken), limit (default 25, max 100).

Aggregated metrics

GET https://www.qlens.dev/api/v1/auto-fix-metrics?days=30
X-API-Key: qlens_<your-key>

# Response (200)
{
  "metrics": {
    "counts":  { "total": 14, "proposed": 11, "prOpened": 9, "merged": 6, "failed": 1, "skippedNoContent": 3 },
    "latency": { "sampleSize": 9, "p50Ms": 48000, "p95Ms": 121000 },
    "cost":    { "totalUsd": 0.0094, "perProposedUsd": 0.000855, "perMergedUsd": 0.001033, "totalInputTokens": 24800, "totalOutputTokens": 4310 },
    "acceptRate": 0.6667,
    "failureModes": [{ "reason": "Below repo threshold", "count": 1 }],
    "timeSaved": { "minutes": 180, "minutesPerMerged": 30 }
  },
  "windowDays": 30,
  "repoFilter": null
}

Filters: days (rolling window, default 30, max 365), repo (single owner/name).

Curl recipes

# Last week's fixes for one repo, just the IDs and PR URLs.
curl -s 'https://www.qlens.dev/api/v1/auto-fixes?repo=acme/app&limit=100' \
  -H "X-API-Key: $QLENS_KEY" \
  | jq '.fixes[] | { id, prUrl, prState, confidence }'

# Plot p50 latency over the last 90 days for the whole org.
curl -s 'https://www.qlens.dev/api/v1/auto-fix-metrics?days=90' \
  -H "X-API-Key: $QLENS_KEY" \
  | jq '.metrics.latency'

Need something else?

Missing a reporter for your framework? Want a batch endpoint or Parquet export? Email support@qlens.dev.