Test endpoints
Dashboard session APIs to trigger individual quality pillar runs.
These endpoints require you to be signed in to VisualQ (same session as the dashboard) unless noted. For CI and automation, use the CI REST API with API keys instead.
Common request body
Most pillar endpoints accept:
| Field | Type | Required | Description |
|---|---|---|---|
project | string | Yes | Project ID or slug |
scenarios | string[] | No | Filter to scenario labels; omit for all |
browsers | string[] | No | chromium, firefox, webkit |
environment | string | No | Environment name or slug |
Typical success response (202-style async):
{
"success": true,
"message": "<pillar> audit started for my-project",
"project": "my-project",
"runId": "run_abc123"
}Poll status via CI status (GET /api/ci/status/{runId}) or dashboard Activity.
Pillar endpoints
| Endpoint | Run type | Description |
|---|---|---|
POST /api/tests/test | vrt-test | Visual regression comparison |
POST /api/tests/reference | baseline | Capture new baselines |
POST /api/tests/a11y | a11y-test | Accessibility (axe-core) |
POST /api/tests/perf | perf-test | Performance / Web Vitals |
POST /api/tests/seo | seo-test | SEO checks |
POST /api/tests/security | security-test | Security headers / CVE (plan-dependent) |
POST /api/tests/analytics | tracking-test | Analytics / tracking audit |
POST /api/tests/full-suite | audit batch | All unlocked pillars for scenario(s) |
Full audit batch
POST /api/tests/full-suite fans out to every pillar unlocked by the org plan. Optional pillars array restricts which pillars run (must be unlocked).
{
"project": "my-project",
"scenarios": ["Homepage"],
"environment": "staging",
"pillars": ["visual", "functional", "a11y", "perf", "seo", "security", "tracking", "privacy"]
}Project-wide equivalent: POST /api/quality-score/full-audit (documented in Run tests).
Approval and recompare
POST /api/tests/approve
Promote failed VRT results to baselines. Supports API key auth (X-API-Key) with mcp_full scope.
| Field | Type | Required | Description |
|---|---|---|---|
project | string | Yes | Project ID or slug |
runId | string | No | Defaults to latest run |
scenarios / scenarioLabels | string[] | Yes | Labels to approve |
viewports | string[] | No | Filter viewports |
browsers | string[] | No | Filter browsers |
environment | string | No | Environment slug |
POST /api/tests/recompare
Re-run pixel comparison for an existing run without recapturing screenshots (when source artifacts exist).
Latest run status
GET /api/tests/status/{project}?environmentId=…
Returns the most recent run for the project (optionally filtered by environment): runId, status, type, startTime, summary counts.
Plan gates
Pillar sub-features (Lighthouse perf/SEO, CVE scanning, a11y budgets) depend on plan — see Plan limits. Endpoints accept the request; locked sub-features are skipped or downgraded automatically.
Related
- CI endpoints — API key auth,
type: perf|seo|analytics - MCP Tools —
run_vrt, pillar report readers - Analytics QA