Skip to main content
GET
/
api
/
v2
/
analytics
/
test-count
Test-count analytics
curl --request GET \
  --url https://api.empirical.run/api/v2/analytics/test-count \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "daily": [
      {
        "date": "<string>",
        "test_count": 123
      }
    ],
    "summary": {
      "latest_count": 123,
      "first_count": 123,
      "change": 123,
      "change_percent": 123
    }
  }
}

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
string

Filter to a single environment by ID.

Response

Daily distinct test counts and a period summary.

data
object
required

Response payload.