Send a GET to /api/v2/ticket_metric_events with a start_time Unix timestamp to retrieve metric events incrementally; the endpoint uses time-based cursor pagination.
Parse each event's metric field (first_reply_time, next_reply_time, agent_work_time, on_hold_time) along with the instance_id that links related start, pause, resume, and fulfill events for the same SLA metric on the same ticket.
To reconstruct elapsed SLA time for a ticket, group events by ticket_id and instance_id, then sum the intervals between activate/start and pause events, and between resume and fulfill/breach events.
Identify breached events by looking for metric event records where type is breach; complement this with the fulfilled_at and breached_at timestamps if present in the event payload.
Cross-reference metric events with the SLA policy attached to the ticket (from the ticket's sla_policy field) to understand whether business hours were in effect for a given metric.
Store the end_time cursor from each response page as the start_time for the next incremental pull; this endpoint is designed for event-stream processing rather than full historical pulls.
Known gotchas
Ticket metric events are append-only incremental records; a single SLA target on a single ticket may generate multiple events (activate, pause, resume, breach/fulfill) — each must be processed in sequence to reconstruct accurate elapsed time.
Business-hours-based metrics pause at the end of each business hours interval and resume at the start of the next; this generates additional pause and resume events that inflate the total event count per ticket compared to calendar-hours metrics.
The start_time parameter is required and must be a Unix timestamp; providing an ISO 8601 string instead of a Unix integer will return a 400 error without a clearly descriptive message.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp