Test Cases
Returns test case analytics with metrics (no history)
history. Fetch history separately with POST /api/v2/analytics/test-case-history/batch for the rows you actually need. Splitting the two queries keeps the table query fast.List test cases sorted by fail rate
Get metrics for a single test case
Filter by tags and search
Authorizations
Project API key from the Empirical dashboard.
Query Parameters
Number of days of history (1-90, default 7). Ignored if start_date and end_date are provided.
Start of custom date range (ISO 8601). Must be used together with end_date.
End of custom date range (ISO 8601). Must be used together with start_date.
Filter by environment ID.
Fetch metrics for a single test case. When provided, search, tags, order_by, order, and limit are ignored.
Substring match on test name or file path.
Comma-separated tags to filter by (includes match).
Sort field. Allowed values: fail_rate, flaky_rate, last_run.
Sort direction. Allowed values: asc, desc.
Maximum number of test cases to return (1-500, default 100).
Set to false to include test cases that no longer exist in the latest synced revision. Defaults to true (active only).
Response
Test case analytics (metrics only).