Skip to main content
POST
Export channel insight

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 as /insight/channel. Rows without a channel ID are skipped. The file has no time-bucket column, so with aggregate_unit the rows of different buckets cannot be told apart; export one bucket per request if you need the split.
  • export_fields sets the columns and their order: channel_id, channel_name, total_incident_cnt, total_incidents_acknowledged, total_incidents_closed, total_incidents_auto_closed, total_incidents_manually_closed, total_incidents_timeout_closed, total_incidents_escalated, total_incidents_manually_escalated, total_incidents_timeout_escalated, total_incidents_reassigned, total_interruptions, total_notifications, total_engaged_seconds, mean_seconds_to_ack, mean_seconds_to_close, noise_reduction_pct, acknowledgement_pct, total_alert_cnt, total_alert_event_cnt, hours. Unknown or duplicate keys are rejected. When it is omitted, all columns are exported, and hours is included only when split_hours is true.
  • The incident-snapshot keys (progress, assigned_to, raw_assigned_to, escalate_rule_name, responders, raw_responders, ackers, owner_id, owner_name, creator_id, creator_name, closer_id, closer_name, snooze_status, snoozed_before, ever_muted, frequency, is_rare, alert_cnt, active_alert_cnt, alert_event_cnt, description, labels, fields) are also accepted for compatibility and produce empty columns.
  • Column headers are localized (request locale, then the member’s, then the account’s). Time buckets follow time_zone (UTC when omitted).

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

Insight dimension-aggregation request. Extends InsightFilter with aggregation controls.

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.

split_hours
boolean

When true, each bucket is further split into work, sleep and off hours, returned as separate rows with hours set.

aggregate_unit
enum<string>

Split the range into time buckets; omit for a single bucket covering the whole range. Requires a range of at least 24 hours, and day allows at most 31 days.

  • day: calendar days in time_zone (the first bucket runs from start_time to the next midnight).
  • week: consecutive 7-day buckets starting at start_time (not aligned to Monday).
  • month: calendar months in time_zone (the first bucket runs from start_time to the 1st of the next month).
Available options:
day,
week,
month

Response

Success

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