Test-run analytics
Analytics
Test-run analytics
Returns daily test-run statistics and a period summary for the scoped project.
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of days to include (1-90). Ignored when both start_date and end_date are provided.
Required range:
1 <= x <= 90Start of a custom date range (ISO 8601).
End of a custom date range (ISO 8601).
Filter to a single environment by ID.
Required range:
x >= 1Filter to test runs on this git branch.
Response
Daily test-run stats and a period summary.
Response payload.