Get Execution Metrics
Get execution metrics for a trigger.
Returns aggregated counts, success rate, execution time and spend. Spend is the cost of the tasks those runs created, joined at read time — a run is recorded when its task starts, the bill accrues afterwards.
Args: trigger_id: The unique identifier of the trigger hours: Time period in hours to analyze; omitted means the whole history user_context: Authentication context trigger_service: Injected trigger service db_session: Session used for the spend join
Returns: Execution metrics for the trigger
Raises: HTTPException: If trigger not found
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Slug of the workspace the request acts in
120^[a-z0-9]+(?:-[a-z0-9]+)*$Query Parameters
Time period in hours (max 1 year). Omit for the trigger's whole history.
1 <= x <= 8760Response
Successful Response
Response model for execution metrics.
Percentage, 0-100, of the runs that tried to start a task; skips excluded.
Events the trigger's conditions turned away, or that came while it was off.
Percentage, 0-100, of the runs that tried to start a task; skips excluded.
Spend per run that produced a costed task.
Runs whose task reported a cost; the divisor behind avg_cost_usd.
Window these metrics cover. Null means the whole history.
Spend of the tasks these runs created.