Export events as CSV
const url = 'https://localhost:3000/api/v1/triggers/example/events/export';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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:*
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Trigger ID (UUID)
Query Parameters
Section titled “Query Parameters”Start (default: now-1h). Supports relative time: now-1h, now-24h
End (default: now). Supports relative time
JSON filter on metadata
Responses
Section titled “Responses”CSV stream
Invalid request or range wider than 31 days
object
Example
invalid_requestExample
Invalid request bodyUnauthorized
object
Example
invalid_requestExample
Invalid request bodyInsufficient permissions
object
Example
invalid_requestExample
Invalid request bodyTrigger not found
object
Example
invalid_requestExample
Invalid request bodyToo many concurrent exports
object
Example
invalid_requestExample
Invalid request bodyInternal error
object
Example
invalid_requestExample
Invalid request body