Skip to main content
GET
/
api
/
test-runs
List Test Runs
curl --request GET \
  --url https://dash.empirical.run/api/test-runs \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "test_runs": {
      "items": [
        {
          "id": 123,
          "state": "pending",
          "total_count": 123,
          "success_count": 123,
          "failed_count": 123,
          "skipped_count": 123,
          "flaky_count": 123,
          "duration": 123,
          "test_run_branch": "<string>",
          "environment_slug": "<string>",
          "environment_name": "<string>",
          "build_url": "<string>",
          "build_branch": "<string>",
          "commit": "<string>",
          "created_at": "<string>"
        }
      ]
    }
  },
  "pagination": {
    "page": 123,
    "per_page": 123,
    "total": 123,
    "total_pages": 123
  }
}

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Query Parameters

page
number

Page number (1-indexed, default 1).

per_page
number

Items per page (default 20, max 100).

branch
string

Filter by Git branch name.

state
string

Filter by test run state. One of: pending, queued, started, ended, error, cancelled, cancelling.

result
string

Filter by test result. One of: passed, failed.

environment_ids
string

Comma-separated list of environment IDs to filter by.

interval_in_days
number

Only return runs from the last N days.

Response

Paginated list of test runs.

data
object
required
pagination
object
required