Skip to content

Automation

REST API

Endpoints, authentication, errors, idempotency and waiting.

All documentation

The REST API is versioned under https://abackinspect.com/api/v1 and described by an OpenAPI 3.1 document at /api/v1/openapi.json. It is part of the Pro and Team plans.

Authentication

Send an API key as Authorization: Bearer aik_.... Keys belong to a workspace and carry scopes: read, run and write. A request outside a key's scopes answers 403 with INSUFFICIENT_SCOPE.

Common endpoints

RequestPurpose
GET /projectsProjects with environments and test health
POST /projects/:id/testsCreate a test from a definition
POST /tests/validateValidate a definition without saving
PATCH /tests/:idUpdate a test; a changed definition creates a version
POST /tests/:id/runs?wait=120Run one test, optionally waiting for the result
POST /projects/:id/runs?wait=300Run all enabled tests, a tag, or a list of tests
GET /runs/:idA run with steps, logs and artifacts
GET /runs/:id/statusA run's status only, for polling
POST /runs/:id/cancelCancel a queued or running run
GET /batches/:id/junitJUnit XML for a suite run
GET /artifacts/:idA screenshot, diff or trace
GET /usageRuns used this month and plan limits

Starting runs

json
{
  "environmentId": "env_...",
  "baseUrl": "https://pr-12.preview.example.com",
  "label": "PR 12",
  "metadata": {
    "commit": "9f2c1e7",
    "branch": "feature/reset",
    "pullRequest": "12",
    "source": "github-actions"
  }
}
  • environmentId defaults to the project's default environment. baseUrl must be on a host in that environment's allow list.
  • ?wait=N holds the response up to N seconds (at most 300) until the runs finish.
  • Idempotency-Key (up to 100 characters) makes a retried request return the original runs with status 200.

Errors

Errors have a stable code, a message and a request id:

json
{
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "This workspace has used 3000 of 3000 runs this month. Usage resets on 01 Dec 2026.",
    "requestId": "req_..."
  }
}

Codes include VALIDATION_ERROR, TEST_DEFINITION_INVALID, TARGET_NOT_ALLOWED, UNSAFE_TARGET, QUOTA_EXCEEDED, RATE_LIMITED, BILLING_REQUIRED, NOT_FOUND and FORBIDDEN. Identifiers from another workspace answer 404.

Rate limits

About 120 requests a minute per key and 30 run requests a minute per workspace. A limited request answers 429 with a retry-after header. Pagination uses nextCursor from list responses.