Skip to main content
The Analytics API provides access to aggregated test data that powers the Analytics page, enabling you to track test health, trends, and performance over time. Use this API to make custom views.

Authentication

All endpoints require authentication using a Bearer token. Generate an API key from the dashboard.
Authorization: Bearer $EMPIRICALRUN_KEY

Versioning

We expect this feature area to evolve, and so these endpoints are explicitly versioned with path-based versioning (v1 in the request path.)

Timestamp Format

All timestamps use ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ) in both request and response payloads. Example: 2025-02-01T10:30:00.000Z

Percentage Values

All percentage fields (e.g., pass_rate, fail_rate, flaky_rate) are integers in the 0-100 range, not decimals.

Date Filtering

All analytics endpoints support date filtering via query parameters:
ParameterTypeDescription
daysnumberNumber of days of history (1-90). Overridden if start_date and end_date are provided.
start_datestringStart of custom date range (ISO 8601). Must be used with end_date.
end_datestringEnd of custom date range (ISO 8601). Must be used with start_date.