Skip to main content
GET
Test-run analytics
Analytics uses path-based versioning; the current recommended version is v2 (/api/v2/analytics/). The v1 endpoints (/api/v1/analytics/*) are deprecated but remain available for backward compatibility. In v2, the v1 test-cases endpoint is split: GET /api/v2/analytics/test-cases returns metrics only, and POST /api/v2/analytics/test-case-history/batch fetches history for one or many test cases in a single request. Percentage fields (pass_rate, fail_rate, flaky_rate) are integers in the 0-100 range, not decimals. All endpoints support date filtering via days (1-90), or a custom start_date/end_date range (ISO 8601).

Authorizations

Authorization
string
header
required

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

Query Parameters

days
integer

Number of days to include (1-90). Ignored when both start_date and end_date are provided.

Required range: 1 <= x <= 90
start_date
string

Start of a custom date range (ISO 8601).

end_date
string

End of a custom date range (ISO 8601).

environment_id
integer

Filter to a single environment by ID.

Required range: x >= 1
branch
string

Filter to test runs on this git branch.

Response

Daily test-run stats and a period summary.

data
object
required

Response payload.