Skip to main content
A common pattern is to react to a Mirador event — typically an automation rule firing — by exporting the full trace into another system: an investigation ticket, a data warehouse, or an incident channel. This page shows how.

There’s no single “export” endpoint — combine two

A complete trace export is the summary plus the event timeline, assembled from two calls:
1

GET /v1/traces/{trace_id}

The trace summary — status, severity, duration, tags, attributes, and any rule matches.
2

GET /v1/traces/{trace_id}/events

The complete, ordered event timeline, returned in one response.
Merge the two into whatever document your downstream system needs:

Recipe: auto-create a ticket when a rule fires

This is the end-to-end flow for “open an investigation ticket whenever an automation rule matches, with the full trace attached.”

1. Receive the automation webhook

Add a Webhook integration to the rule. When the rule fires, Mirador POSTs this JSON to your URL:
The webhook tells you a rule matched and which entities matched — but it does not contain the trace’s data. Each entry in entities carries the matched object’s type and id; read the id of the trace entity, then fetch the full trace from the REST API. See the webhook payload reference for every field, including how entities may grow to cover other types over time.

2. Read the trace_id, fetch the trace, open the ticket

The matched trace’s id arrives directly on the entity as id — no parsing required. Find the trace entity, then fetch and file it:

3. Harden the consumer

  • Authenticate the webhook. Mirador lets you attach custom headers to a webhook integration — set a shared secret (e.g. X-Webhook-Secret) and verify it on every request. Reject anything that doesn’t match.
  • Acknowledge fast, work async. Return 2xx immediately, then fetch and file the ticket out of band. Slow responses count as delivery failures.
  • Be idempotent. A webhook may be delivered more than once. Dedupe on the event_id — it’s unique per delivery — so you don’t open duplicate tickets.
  • Handle retries from your side too. If the REST fetch returns UNAVAILABLE or DEADLINE_EXCEEDED, retry with backoff before giving up.

Polling instead of webhooks

If you’d rather pull than receive pushes, poll GET /v1/traces on a schedule with a since window and a filter, then export each match:
Track the latest created_at you’ve processed and advance since each run so you don’t re-export the same traces.

Next Steps

Endpoints

Filter syntax, pagination, and response shapes

Automation rules

Define the conditions that trigger the webhook