> ## Documentation Index
> Fetch the complete documentation index at: https://test-8ad8522e-feat-ai-sre.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询洞察故障列表

> 返回用于分析看板的故障分页列表，包含每条故障的处理效能指标。

## 限制说明

| 项目   | 说明                             |
| ---- | ------------------------------ |
| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |
| 权限要求 | **分析看板查看**（`on-call`）          |


## OpenAPI

````yaml /api-reference/on-call.openapi.zh.json post /insight/incident/list
openapi: 3.1.0
info:
  title: Flashduty 开放 API
  description: >-
    Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在
    query 中携带 `app_key`，该 key 在 Flashduty 控制台 账户 → APP Key 中签发。所有响应使用统一结构：成功时为
    `{ request_id, data }`，失败时为 `{ request_id, error }`。
  version: 1.0.0
servers:
  - url: https://api.flashcat.cloud
    description: Flashduty Open API
security:
  - AppKeyAuth: []
tags:
  - name: On-call/故障管理
    description: ''
  - name: On-call/协作空间
    description: ''
  - name: On-call/告警管理
    description: 查询、查看和处理告警，管理卡片视图与告警处理规则。
  - name: On-call/集成中心
    description: ''
  - name: On-call/IM 集成
    description: IM 集成相关查询，例如查看哪些集成开启了作战室。
  - name: On-call/值班排班
    description: ''
  - name: On-call/许可管理
    description: ''
  - name: On-call/日历管理
    description: ''
  - name: On-call/通知模板
    description: ''
  - name: On-call/标签增强
    description: 自定义字段、富化规则及数据映射（映射规则、映射数据、映射 API）管理。
  - name: On-call/分析看板
    description: ''
  - name: On-call/状态页
    description: ''
  - name: On-call/变更管理
    description: ''
paths:
  /insight/incident/list:
    post:
      tags:
        - On-call/分析看板
      summary: 查询洞察故障列表
      description: 返回用于分析看板的故障分页列表，包含每条故障的处理效能指标。
      operationId: insightIncidentList
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsightIncidentListRequest'
            example:
              start_time: 1712000000
              end_time: 1712604800
              p: 1
              limit: 20
              severities:
                - Critical
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/InsightIncidentListResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  total: 2363
                  has_next_page: true
                  search_after_ctx: 6a86b5d6f72de50ae1ce2ffb
                  items:
                    - incident_id: 6a86b5d6f72de50ae1ce2ffb
                      title: CPU usage above 90% on prod-web-01
                      description: CPU usage stayed above the threshold for 5 minutes
                      team_id: 2477033058131
                      team_name: SRE Team
                      channel_id: 3047621227131
                      channel_name: Production Alerts
                      progress: Closed
                      severity: Critical
                      created_at: 1787213270
                      alert_cnt: 3
                      active_alert_cnt: 0
                      alert_event_cnt: 5
                      closed_by: manually
                      creator_id: 2477273692131
                      creator_name: alice
                      closer_id: 2477273692131
                      closer_name: alice
                      seconds_to_ack: 14
                      seconds_to_close: 1830
                      engaged_seconds: 1816
                      hours: work
                      responders:
                        - person_id: 2477273692131
                          assigned_at: 1787213270
                          acknowledged_at: 1787213284
                          person_name: alice
                          email: alice@example.com
                      assigned_to:
                        escalate_rule_id: 66138789904a9027583dbc4e
                        layer_idx: 0
                        type: assign
                        assigned_at: 1787213270
                        id: b8tyUoRvCv4wsPndFRpmNL
                        escalate_rule_name: On-call Policy
                      notifications: 2
                      interruptions: 1
                      assignments: 1
                      reassignments: 0
                      acknowledgements: 1
                      escalations: 0
                      timeout_escalations: 0
                      manual_escalations: 0
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    InsightIncidentListRequest:
      allOf:
        - $ref: '#/components/schemas/InsightFilter'
        - type: object
          description: 故障分页列表请求。在 InsightFilter 基础上增加分页字段。
          properties:
            p:
              type:
                - integer
                - 'null'
              minimum: 0
              default: 1
              description: >-
                页码，从 1 开始。仅在未提供 `search_after_ctx` 时生效；`p * limit` 不能超过 10,000
                条。
            limit:
              type:
                - integer
                - 'null'
              minimum: 0
              maximum: 100
              default: 20
              description: 每页条数，最大 100，默认 20。
            search_after_ctx:
              type:
                - string
                - 'null'
              description: 上一页返回的分页游标（该页最后一行的故障 ID），传入以获取下一页。
    SuccessEnvelope:
      type: object
      description: >-
        成功响应结构。2xx 响应中 `request_id` 标识本次调用（同时出现在 `Flashcat-Request-Id`
        响应头中），`data` 为接口业务 payload。失败响应使用不同结构，参见 `ErrorResponse`。
      properties:
        request_id:
          type: string
          description: 本次请求的唯一 ID，也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        data:
          description: 每个接口自己的业务 payload，详见各接口的 200 响应 schema。
      required:
        - request_id
        - data
    InsightIncidentListResponse:
      type: object
      properties:
        total:
          type: integer
          format: int64
          description: 匹配的故障总数。
        has_next_page:
          type: boolean
          description: 是否还有下一页。
        search_after_ctx:
          type: string
          description: 下一页游标——本页最后一行的故障 ID。仅在 `has_next_page` 为 true 时返回。
        items:
          type: array
          items:
            $ref: '#/components/schemas/IncidentRawItem'
          description: 故障明细列表。
    InsightFilter:
      type: object
      description: >-
        洞察与导出接口共享的过滤参数。`severities` 至多 3 项，team/channel/responder/incident
        过滤条件每项至多 100 条，时间范围不能超过一年。
      required:
        - start_time
        - end_time
      properties:
        start_time:
          type: integer
          format: int64
          description: 起始时间，Unix 秒。必须大于 0。
          exclusiveMinimum: 0
        end_time:
          type: integer
          format: int64
          description: 结束时间，Unix 秒，必须大于 `start_time`。
        team_ids:
          type: array
          items:
            type: integer
            format: int64
          description: 按团队 ID 过滤，至多 100 项。
          maxItems: 100
        channel_ids:
          type: array
          items:
            type: integer
            format: int64
          description: 按协作空间 ID 过滤，至多 100 项。
          maxItems: 100
        responder_ids:
          type: array
          items:
            type: integer
            format: int64
          description: 按处理人员 ID 过滤，至多 100 项。
          maxItems: 100
        severities:
          type: array
          items:
            type: string
            enum:
              - Critical
              - Warning
              - Info
              - Ok
          description: 按严重程度过滤，至多 3 项。
          maxItems: 3
        incident_ids:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: 按故障 ID（MongoDB ObjectID）过滤，至多 100 项。
          maxItems: 100
        query:
          type: string
          description: 对故障标题做子串匹配（SQL `LIKE %query%`）。
        labels:
          type: object
          additionalProperties:
            type: string
          description: 标签过滤（精确匹配）。
        fields:
          type: object
          additionalProperties: true
          description: 自定义字段过滤（精确匹配）。
        orderby:
          type: string
          enum:
            - created_at
          description: 故障列表的排序字段，目前仅支持 `created_at`（故障创建时间）。仅 `/insight/incident/list` 使用。
        asc:
          type: boolean
          description: 为 `true` 时升序，否则降序。仅 `/insight/incident/list` 使用。
        is_my_team:
          type: boolean
          description: 是否仅返回调用者所属团队的数据。若调用者无任何团队，返回空集合。
        time_zone:
          type: string
          description: >-
            用于划分 日/周/月 聚合桶的 IANA 时区名（如 `Asia/Shanghai`）。可选，默认 UTC；仅
            `/insight/incident/export` 例外：缺省时依次回退到账户时区、`Asia/Shanghai`。
        seconds_to_close_from:
          type: integer
          format: int64
          description: 解决时长下界（秒，包含）。
          minimum: 0
        seconds_to_close_to:
          type: integer
          format: int64
          description: 解决时长上界（秒，不包含）。两端同时设置时，必须大于 `seconds_to_close_from`。
          minimum: 0
        seconds_to_ack_from:
          type: integer
          format: int64
          description: 认领时长下界（秒，包含）。
          minimum: 0
        seconds_to_ack_to:
          type: integer
          format: int64
          description: 认领时长上界（秒，不包含）。两端同时设置时，必须大于 `seconds_to_ack_from`。
          minimum: 0
        export_fields:
          type: array
          items:
            type: string
          description: >-
            导出 CSV 的列 key 列表，按给定顺序输出；未知或重复的 key 会被拒绝。各导出接口支持的 key
            集合不同，见对应接口的描述。仅导出接口使用；最多 50 个。
          maxItems: 50
        description_html_to_text:
          type: boolean
          description: 导出时是否将描述列中的 HTML 标签转换为纯文本。
        include_ever_muted:
          type: boolean
          description: 是否包含曾被收敛的故障；默认不包含。
    IncidentRawItem:
      type: object
      description: 分析看板故障列表返回的原始故障记录，附带每条故障的处理效能指标。
      properties:
        incident_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: 故障 ID，账户内唯一。
        title:
          type: string
          description: 故障标题。
        description:
          type: string
          description: 故障描述；为空时不返回。
        team_id:
          type: integer
          format: int64
          description: 故障归属团队的 ID。
        team_name:
          type: string
          description: 故障归属团队的名称。
        channel_id:
          type: integer
          format: int64
          description: 故障所属协作空间的 ID。
        channel_name:
          type: string
          description: 故障所属协作空间的名称。
        progress:
          type: string
          description: 故障处理状态——`Triggered`（触发）、`Processing`（处理中）、`Closed`（已关闭）之一。
          enum:
            - Triggered
            - Processing
            - Closed
        severity:
          type: string
          enum:
            - Critical
            - Warning
            - Info
          description: 故障严重程度。
        created_at:
          type: integer
          format: int64
          description: 故障创建时间，Unix 时间戳（秒）。
        alert_cnt:
          type: integer
          format: int64
          description: 故障聚合的告警总数。
        active_alert_cnt:
          type: integer
          format: int64
          description: 仍处于活跃（未恢复）状态的告警数量。
        alert_event_cnt:
          type: integer
          format: int64
          description: 故障关联的告警事件总数；一条告警的每次上报计为一个事件。
        closed_by:
          type: string
          enum:
            - ''
            - auto
            - timeout
            - manually
          description: 关闭方式：`auto` 自动关闭、`timeout` 超时关闭、`manually` 人工关闭；未关闭时为空字符串。
        owner_id:
          type: integer
          format: int64
          description: 故障负责人的成员 ID。为 0（无负责人）时不返回。
        owner_name:
          type: string
          description: 故障负责人的显示名。为空时不返回。
        creator_id:
          type: integer
          format: int64
          description: 故障创建人的成员 ID。
        creator_name:
          type: string
          description: 故障创建人的显示名称。
        closer_id:
          type: integer
          format: int64
          description: 关闭人的成员 ID。为 0（非人工关闭）时不返回。
        closer_name:
          type: string
          description: 关闭人的显示名。为空时不返回。
        seconds_to_ack:
          type: integer
          format: int64
          description: 从故障创建到首次认领的耗时（秒）；从未认领时为 0。
        seconds_to_close:
          type: integer
          format: int64
          description: 从故障创建到关闭的耗时（秒）；未关闭时为 0。
        engaged_seconds:
          type: integer
          format: int64
          description: 处理耗时总和（秒）：所有已认领处理人员的「关闭时间 − 本人认领时间」之和；未关闭时为 0。
        hours:
          type: string
          enum:
            - work
            - 'off'
            - sleep
          description: >-
            故障创建时刻在账户时区下所处的时段：`work` 工作日 08:00–19:00，`sleep` 每日 23:00–次日
            08:00，`off` 其余时间。
        snoozed_before:
          type: integer
          format: int64
          description: 故障静默到的截止时间，Unix 时间戳（秒）。未静默时不返回该字段。
        ever_muted:
          type: boolean
          description: 故障是否曾被降噪收敛。为 false 时不返回。
        frequency:
          type: string
          enum:
            - frequent
            - rare
          description: 频率分类：`frequent`（高频）或 `rare`（低频）。未分类时不返回。
        responders:
          type: array
          description: 处理人员列表，记录每个人的分派与认领时间。
          items:
            type: object
            properties:
              person_id:
                type: integer
                format: int64
                description: 处理人员的成员 ID。
              assigned_at:
                type: integer
                format: int64
                description: 被分派的时间，Unix 时间戳（秒）。
              acknowledged_at:
                type: integer
                format: int64
                description: 认领时间，Unix 时间戳（秒）；未认领时为 0。
              person_name:
                type: string
                description: 处理人员的显示名称；为空时不返回。
              email:
                type: string
                description: 处理人员的邮箱；为空时不返回。
              as:
                type: string
                description: 处理人员在外部协作 IM（如 Slack）中的标识；仅在外部系统回填时返回。
        assigned_to:
          type:
            - object
            - 'null'
          description: 故障的当前分派信息；无分派记录时为 `null`。
          properties:
            person_ids:
              type: array
              items:
                type: integer
                format: int64
              description: 直接分派给该故障的成员 ID 列表。
            escalate_rule_id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
              description: 驱动分派的升级规则 ID（MongoDB ObjectID）。
            escalate_rule_name:
              type: string
              description: 升级规则的显示名称。
            layer_idx:
              type: integer
              description: 升级规则中的当前级别索引。
            type:
              type: string
              enum:
                - assign
                - reassign
                - escalate
                - reopen
              description: |-
                分派类型。
                | 值 | 含义 |
                |---|---|
                | `assign` | 手动创建故障时的首次指派。 |
                | `reassign` | 对已有故障的再次指派。 |
                | `escalate` | 分派策略升级触发的指派。 |
                | `reopen` | 故障重新打开后从第一环节重新开始的分派。 |
            assigned_at:
              type: integer
              format: int64
              description: 本次分派发生的时间戳（Unix 秒）。
            id:
              type: string
              description: 内部分派记录 ID。
        labels:
          type: object
          additionalProperties:
            type: string
          description: 故障标签键值对。本接口响应中始终不返回（仅供导出使用）。
        fields:
          type: object
          additionalProperties: true
          description: 故障自定义字段。本接口响应中始终不返回（仅供导出使用）。
        notifications:
          type: integer
          format: int64
          description: 通知发送总次数。
        interruptions:
          type: integer
          format: int64
          description: 打扰次数：通过 App 推送、短信、电话语音渠道发送的通知次数；同一处理人员 60 秒内的连续通知合并计为一次。
        assignments:
          type: integer
          format: int64
          description: 分派次数。
        reassignments:
          type: integer
          format: int64
          description: 改派（重新分派）次数。
        acknowledgements:
          type: integer
          format: int64
          description: 认领次数。
        escalations:
          type: integer
          format: int64
          description: 升级总次数，等于 `timeout_escalations` 与 `manual_escalations` 之和。
        timeout_escalations:
          type: integer
          format: int64
          description: 超时未处理触发的升级次数。
        manual_escalations:
          type: integer
          format: int64
          description: 人工手动触发的升级次数。
    ErrorResponse:
      type: object
      description: 错误响应结构。`error` 必填，`data` 不存在。
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          description: 本次请求的唯一追踪 ID（trace ID），反馈问题时请提供该值以便检索日志。
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    DutyError:
      type: object
      description: 响应结构中的错误 payload，仅在非 2xx 响应时出现。
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: 用户可读的错误描述，语言会跟随调用方的 Accept-Language。可能包含字段名、ID 等请求上下文。
          example: The specified parameter template_id is not valid.
      required:
        - code
        - message
    ErrorCode:
      type: string
      description: >-
        Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一，HTTP 状态码仅作参考。


        | 错误码 | HTTP | 含义 |

        |---|---|---|

        | `OK` | 200 | 保留值，正常错误响应不会返回。 |

        | `InvalidParameter` | 400 | 必填参数缺失或未通过校验。 |

        | `BadRequest` | 400 | 通用的 400 错误，通常是请求本身不合法。 |

        | `InvalidContentType` | 400 | 请求头 `Content-Type` 不是 `application/json`。
        |

        | `ResourceNotFound` | 400 | 目标资源不存在。注意 HTTP 状态码是 400 而非 404（历史设计）。 |

        | `NoLicense` | 400 | 功能需要有效授权，但未找到可用的 license。 |

        | `ReferenceExist` | 400 | 该资源仍被其他实体引用，无法删除。 |

        | `Unauthorized` | 401 | `app_key` 缺失、无效或已过期。 |

        | `BalanceNotEnough` | 402 | 账户余额不足，无法执行需要计费的操作。 |

        | `AccessDenied` | 403 | 身份认证通过，但 RBAC 权限不足以执行该操作。 |

        | `RouteNotFound` | 404 | 请求的 URL 路径不是已知路由。 |

        | `MethodNotAllowed` | 405 | 当前路径不接受所使用的 HTTP 方法。 |

        | `UndonedOrderExist` | 409 | 账户存在未完成的订单，请稍后重试。 |

        | `RequestLocked` | 423 | 因连续失败被临时锁定。 |

        | `EntityTooLarge` | 413 | 请求体超过允许的最大长度。 |

        | `RequestTooFrequently` | 429 | 命中限流（全局、账户级或集成级）。 |

        | `RequestVerifyRequired` | 428 | 操作需要二次验证码，但未提供。 |

        | `DangerousOperation` | 428 | 危险操作，需要进行 MFA 验证。 |

        | `InternalError` | 500 | 服务端未预期错误。反馈问题请附上 `request_id`。 |

        | `ServiceUnavailable` | 503 | 后端依赖不可用，请稍后重试。 |
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - RequestLocked
        - EntityTooLarge
        - RequestTooFrequently
        - RequestVerifyRequired
        - DangerousOperation
        - InternalError
        - ServiceUnavailable
      x-enumDescriptions:
        OK: 保留值，正常错误响应不会返回。
        InvalidParameter: 必填参数缺失或未通过校验。
        BadRequest: 通用的 400 错误，通常是请求本身不合法。
        InvalidContentType: 请求头 `Content-Type` 不是 `application/json`。
        ResourceNotFound: 目标资源不存在。注意 HTTP 状态码是 400 而非 404（历史设计）。
        NoLicense: 功能需要有效授权，但未找到可用的 license。
        ReferenceExist: 该资源仍被其他实体引用，无法删除。
        Unauthorized: '`app_key` 缺失、无效或已过期。'
        BalanceNotEnough: 账户余额不足，无法执行需要计费的操作。
        AccessDenied: 身份认证通过，但 RBAC 权限不足以执行该操作。
        RouteNotFound: 请求的 URL 路径不是已知路由。
        MethodNotAllowed: 当前路径不接受所使用的 HTTP 方法。
        UndonedOrderExist: 账户存在未完成的订单，请稍后重试。
        RequestLocked: 因连续失败被临时锁定。
        EntityTooLarge: 请求体超过允许的最大长度。
        RequestTooFrequently: 命中限流（全局、账户级或集成级）。
        RequestVerifyRequired: 操作需要二次验证码，但未提供。
        DangerousOperation: 危险操作，需要进行 MFA 验证。
        InternalError: 服务端未预期错误。反馈问题请附上 `request_id`。
        ServiceUnavailable: 后端依赖不可用，请稍后重试。
      example: InvalidParameter
  responses:
    BadRequest:
      description: 请求非法 — 通常是参数缺失或格式不正确。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InvalidParameter
                  message: The specified parameter is not valid.
    Unauthorized:
      description: app_key 缺失或无效。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingAppKey:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: Unauthorized
                  message: You are unauthorized.
    TooManyRequests:
      description: 命中限流。可能是全局 API 限流、账户级限流或集成级限流。限流按账户聚合。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: RequestTooFrequently
                  message: Request too frequently.
    ServerError:
      description: 服务端未预期错误。反馈问题时请携带 request_id。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InternalError
                  message: >-
                    We encountered an internal error, and it has been reported.
                    Please try again later.
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: app_key
      description: >-
        在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API
        时都必须携带。它等同于所属账户的身份凭证，请妥善保管。

````