Skip to main content
POST
Export insight incidents

Restrictions

Usage

  • The response is a CSV file (Content-Type: application/octet-stream), not a JSON envelope. Validation errors are returned as JSON before any CSV bytes are written.
  • Takes the same filters and sort order as /insight/incident/list. Export stops once more than 100,000 rows have been written.
  • start_time is moved forward to the earliest date kept by the account’s data retention; a range that ends before that date is rejected.
  • export_fields sets the columns and their order: incident_id, title, severity, progress, channel_id, channel_name, team_id, team_name, created_at, alert_cnt, active_alert_cnt, alert_event_cnt, seconds_to_ack, seconds_to_close, closed_by, owner_id, owner_name, creator_id, creator_name, closer_id, closer_name, engaged_seconds, hours, notifications, interruptions, acknowledgements, ackers, assignments, reassignments, escalations, manual_escalations, timeout_escalations, assigned_to, raw_assigned_to, escalate_rule_name, responders, raw_responders, snooze_status, snoozed_before, ever_muted, frequency, is_rare, description, labels, fields. Unknown or duplicate keys are rejected; when omitted, every column except the aliases owner_id, creator_id, closer_id, snoozed_before and is_rare is exported.
  • description_html_to_text: true strips HTML from the description column.
  • Headers and formatted values use the request locale, then the member’s, then the account’s. Times are rendered in time_zone, falling back to the account time zone and then Asia/Shanghai.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Shared filter envelope for insight and export endpoints. Severities accept up to 3 values; team/channel/responder/incident filters accept up to 100 IDs each. The time range cannot exceed one year.

start_time
integer<int64>
required

Start time, Unix seconds. Must be greater than 0.

end_time
integer<int64>
required

End time, Unix seconds. Must be greater than start_time.

team_ids
integer<int64>[]

Filter by team IDs. At most 100 entries.

Maximum array length: 100
channel_ids
integer<int64>[]

Filter by channel IDs. At most 100 entries.

Maximum array length: 100
responder_ids
integer<int64>[]

Filter by responder member IDs. Used by /insight/responder (which responders to return) and the incident list/export (incidents any of them responded to); ignored by the account/team/channel and top-K endpoints. At most 100 entries.

Maximum array length: 100
severities
enum<string>[]

Filter by severity: Critical, Warning, Info, or Ok. At most 3 entries.

Maximum array length: 3
Available options:
Critical,
Warning,
Info,
Ok
incident_ids
string[]

Filter by incident IDs (24-character hex). Used only by the incident list and export. At most 100 entries.

Maximum array length: 100
Pattern: ^[0-9a-fA-F]{24}$
query
string

Substring match on the incident title (SQL LIKE %query%).

labels
object

Label filters (exact match).

fields
object

Custom-field filters (exact match).

orderby
enum<string>

Sort field of the incident list; only created_at (incident creation time, the default). Used by /insight/incident/list and /insight/incident/export.

Available options:
created_at
asc
boolean

Sort ascending when true, descending (default) otherwise. Used by the incident list and export; /insight/alert/topk-by-label has its own asc.

is_my_team
boolean

Restrict results to the caller's teams (intersected with team_ids when both are set). When that intersection is empty, or the caller belongs to no team, the result is empty.

time_zone
string

IANA time zone (for example Asia/Shanghai or UTC) used to cut aggregate_unit buckets; abbreviations such as EST and Etc/GMT±N are rejected. Defaults to UTC. /insight/incident/export uses it to render times, falling back to the account time zone and then Asia/Shanghai.

seconds_to_close_from
integer<int64>

Lower bound (inclusive) on time-to-close, in seconds.

Required range: x >= 0
seconds_to_close_to
integer<int64>

Upper bound (exclusive) on time-to-close, in seconds. Must be greater than seconds_to_close_from when both are set: the incident list and export reject such a range with InvalidParameter, and other endpoints return an empty result.

Required range: x >= 0
seconds_to_ack_from
integer<int64>

Lower bound (inclusive) on time-to-acknowledge, in seconds.

Required range: x >= 0
seconds_to_ack_to
integer<int64>

Upper bound (exclusive) on time-to-acknowledge, in seconds. Must be greater than seconds_to_ack_from when both are set: the incident list and export reject such a range with InvalidParameter, and other endpoints return an empty result.

Required range: x >= 0
export_fields
string[]

CSV column keys to include in the export, in the given order; unknown or duplicate keys are rejected. The valid key set differs per export endpoint — see each export operation's description. Only used by the export endpoints; at most 50 entries.

Maximum array length: 50
description_html_to_text
boolean

Strip HTML markup from the description column when exporting.

include_ever_muted
boolean

Include incidents that have ever been muted. By default, they are excluded.

Response

Success

CSV file (Content-Type: application/octet-stream, Content-Disposition: attachment; filename*=UTF-8''incident_export_yyyyMMdd_HHmmss.csv). The first row holds localized column headers.