Skip to main content
GET
/
api
/
test-cases
/
v2
List Test Cases
curl --request GET \
  --url https://dash.empirical.run/api/test-cases/v2 \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "test_cases": [
      {
        "id": "a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee",
        "name": "search works",
        "file_path": "search.spec.ts",
        "suites": ["Search"],
        "playwright_project": "chromium",
        "tags": ["smoke"],
        "created_at": "2026-01-15T10:30:00Z",
        "updated_at": "2026-03-20T14:00:00Z",
        "first_seen_commit_sha": "abc1234",
        "last_seen_commit_sha": "def5678"
      }
    ]
  },
  "pagination": {
    "page": 1,
    "per_page": 100,
    "has_more": false
  }
}
Returns test cases from the test_cases_v2 table, keyed by Playwright test ID (pw_test_id). Supports filtering by file path, Playwright project, tags, and full-text search.
{
  "data": {
    "test_cases": [
      {
        "id": "a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee",
        "name": "search works",
        "file_path": "search.spec.ts",
        "suites": ["Search"],
        "playwright_project": "chromium",
        "tags": ["smoke"],
        "created_at": "2026-01-15T10:30:00Z",
        "updated_at": "2026-03-20T14:00:00Z",
        "first_seen_commit_sha": "abc1234",
        "last_seen_commit_sha": "def5678"
      }
    ]
  },
  "pagination": {
    "page": 1,
    "per_page": 100,
    "has_more": false
  }
}

Example

curl -X GET \
  "https://dash.empirical.run/api/test-cases/v2?project_id=4&search=login&tags=smoke" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY"

Filter by IDs

Fetch specific test cases by their Playwright test IDs (comma-separated, max 100).
curl -X GET \
  "https://dash.empirical.run/api/test-cases/v2?ids=a30a6eba6312f6b87ea5-55e241fbe3f4b8ae61ee,b41b7fcb7423g7c98fb6-66f352cgf5g5c9bf72ff" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY"

Authorizations

Authorization
string
header
required

API key from the Empirical dashboard.

Query Parameters

project_id
number
required

The project ID.

Text search across test name, file path, and suites.

file_path
string

Filter by file path (prefix match).

playwright_project
string

Filter by Playwright project name (e.g. "chromium").

tags
string

Comma-separated list of tags to filter by.

first_seen_commit_sha
string

Filter by the commit SHA where the test was first seen.

last_seen_commit_sha
string

Filter by the commit SHA where the test was last seen.

is_active
string

When true (default), returns only active tests. Set to false to include all tests.

per_page
number

Items per page (default 100).

page
number

Page number (1-indexed, default 1).

Response

Paginated list of test cases.

data
object
required
pagination
object
required