Skip to main content
POST
/
api
/
v2
/
analytics
/
test-case-last-pass-per-env
Last passing run per environment
curl --request POST \
  --url https://api.empirical.run/api/v2/analytics/test-case-last-pass-per-env \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "test_case_id": "<string>",
  "project_id": 2,
  "days": 2,
  "before": "<string>"
}
'
{
  "data": [
    {
      "environment_id": "<string>",
      "test_run_id": "<string>",
      "executed_at": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
test_case_id
string
required

Test case ID to look up.

Minimum string length: 1
project_id
integer

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

Required range: x >= 1
days
integer

Look-back window in days (default 30).

Required range: x >= 1
before
string

Anchor the lookup to this point in time (ISO 8601); returns the last pass as of then.

Response

Last passing run per environment.

data
object[]
required

Response payload.