Skip to main content
GET
/
api
/
v2
/
test-cases
List test cases
curl --request GET \
  --url https://api.empirical.run/api/v2/test-cases \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "test_cases": [
      {
        "id": "<string>",
        "name": "<string>",
        "file_path": "<string>",
        "suites": [
          "<string>"
        ],
        "playwright_project": "<string>",
        "tags": [
          "<string>"
        ],
        "created_at": "<string>",
        "updated_at": "<string>",
        "first_seen_commit_sha": "<string>",
        "last_seen_commit_sha": "<string>",
        "dependencies": {
          "playwright_serial": {
            "group_id": "<string>",
            "title_path": [
              "<string>"
            ],
            "file_path": "<string>",
            "playwright_project": "<string>",
            "dependency_order": 123,
            "group_size": 123,
            "depends_on": [
              "<string>"
            ]
          }
        }
      }
    ],
    "sync_error": {
      "message": "<string>",
      "occurred_at": "<string>"
    }
  },
  "pagination": {
    "page": 123,
    "per_page": 123,
    "total": 123,
    "total_pages": 123,
    "has_more": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

ids
string

Comma-separated Playwright test IDs to filter by. Capped at the first 100.

file_path
string

Filter to test cases whose file path starts with this value.

playwright_project
string

Filter to test cases in this Playwright project.

tags
string

Comma-separated tags; returns test cases having any of the given tags.

Free-text search across the test case name and file path.

first_seen_commit_sha
string

Filter to test cases first seen at this commit SHA.

last_seen_commit_sha
string

Filter to test cases last seen at this commit SHA.

is_active
enum<string>

When true (default), restrict to test cases present at the project's last synced commit. Set false to include all test cases.

Available options:
true,
false
page
integer
default:1

Page number (1-indexed). Defaults to 1.

Required range: x >= 1
per_page
integer
default:100

Items per page. Defaults to 100.

Required range: x >= 1

Response

Paginated test cases and sync status.

data
object
required

Test cases plus the project's sync status.

pagination
object
required

Pagination metadata.