Skip to main content
GET
A rule's sessions

Authorizations

Authorization
string
header
required

A project token (apsio_pt_v0...), which reads exactly one project, or an OAuth access token issued for the API, which reads what its user can. Access tokens issued for Apsio's MCP server are accepted only from the MCP server itself.

Path Parameters

projectId
string
required
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"0192f3a4-0000-7000-8000-00000000a101"

ruleId
string
required

The rule's id in the app's policy (spec 15.8).

Pattern: ^[a-z0-9._-]{1,64}$
Example:

"checkout-5xx"

Query Parameters

from
string<date-time>

Start of the time range, inclusive (RFC 3339). Defaults to the range end minus the default length.

Example:

"2026-10-01T00:00:00Z"

to
string<date-time>

End of the time range, exclusive (RFC 3339). Defaults to now.

Example:

"2026-10-08T00:00:00Z"

app_id
string
required

The app whose policy defines the rules: the same id in two apps is two rules.

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Response

The rule's sessions.

trigger
string
required
Example:

"rule:checkout-5xx"

sessions
integer
required
last_at
string | null
required

When the newest session in the range in which the rule fired started; null when it fired in none.

all_sessions
integer
required
crashed
integer
required

Of the sessions in which the rule fired, those that crashed.

abnormal_exit
integer
required

Of the sessions in which the rule fired, those that ended abnormally.

days
object[]
required
retention_days
integer
required

How many days of crashes and release health the project's plan keeps (D94). Nothing older is returned, whatever the time range.

Example:

90