Skip to main content
POST
/
api
/
v2
/
analytics
/
test-case-history
/
batch
Test-case execution history (batch)
curl --request POST \
  --url https://api.empirical.run/api/v2/analytics/test-case-history/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "test_case_ids": [
    "<string>"
  ],
  "project_id": 2,
  "days": 45,
  "start_date": "<string>",
  "end_date": "<string>",
  "environment_id": "<string>",
  "limit_per_test_case": 500
}
'
{
  "data": {
    "history_by_test_case_id": {}
  },
  "meta": {
    "project_id": "<string>",
    "days": 123,
    "start_date": "<string>",
    "end_date": "<string>",
    "environment_id": "<string>",
    "limit_per_test_case": 123,
    "truncated_test_case_ids": [
      "<string>"
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
test_case_ids
string[]
required

Test case IDs to fetch history for (non-empty).

Minimum array length: 1
project_id
integer

Project ID (ignored; the project comes from auth scope).

Required range: x >= 1
days
integer

Number of days of history (1-90, default 30). Ignored when start_date and end_date are set.

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 by environment ID.

limit_per_test_case
integer

Maximum history entries returned per test case (1-1000, default 50).

Required range: 1 <= x <= 1000
{key}
unknown

Response

History grouped by test case.

data
object
required

Response payload.

meta
object
required

Echoed query parameters and truncation metadata.