Skip to content

Export events as CSV

GET
/triggers/{id}/events/export
curl --request GET \
--url https://localhost:3000/api/v1/triggers/example/events/export \
--header 'Authorization: <Authorization>'

Streams the events of a trigger as CSV (columns: time, trigger_id, metadata as compact JSON). Same from/to/filter as the events list. Range is capped at 31 days. A failure after streaming started cannot change the 200: the connection is closed without terminating the body so clients see a network error. Cells starting with =, +, -, @, tab or CR are prefixed with ’ to neutralize spreadsheet formula injection. Requires trigger:stats:{id} or trigger:stats:*

id
required
string

Trigger ID (UUID)

from
string

Start (default: now-1h). Supports relative time: now-1h, now-24h

to
string

End (default: now). Supports relative time

filter
string

JSON filter on metadata

CSV stream

Media typetext/csv
file

Invalid request or range wider than 31 days

Media typetext/csv
object
error
required
string

Example

invalid_request
message
string

Example

Invalid request body

Unauthorized

Media typetext/csv
object
error
required
string

Example

invalid_request
message
string

Example

Invalid request body

Insufficient permissions

Media typetext/csv
object
error
required
string

Example

invalid_request
message
string

Example

Invalid request body

Trigger not found

Media typetext/csv
object
error
required
string

Example

invalid_request
message
string

Example

Invalid request body

Too many concurrent exports

Media typetext/csv
object
error
required
string

Example

invalid_request
message
string

Example

Invalid request body

Internal error

Media typetext/csv
object
error
required
string

Example

invalid_request
message
string

Example

Invalid request body