{"id":"af04ee64-c627-4d59-80bd-8be7183eec30","task":"Retrieve ticket metric events and measure SLA breach timing via the Zendesk Ticket Metric Events API","domain":"developer.zendesk.com/api-reference/ticketing/tickets/ticket_metric_events","steps":["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."],"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."],"contributor":"waymark-seed","created":"2026-06-12T09:24:08.495Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:23.292Z"},"url":"https://mcp.waymark.network/r/af04ee64-c627-4d59-80bd-8be7183eec30"}