> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashduty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 批量查询故障

> 通过故障 ID 列表批量获取故障信息。

## 限制说明

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


## OpenAPI

````yaml /api-reference/on-call.openapi.zh.json post /incident/list-by-ids
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: 自定义字段、富化规则及数据映射（映射规则、映射数据、映射 API）管理。
  - name: On-call/分析看板
    description: ''
  - name: On-call/状态页
    description: ''
  - name: On-call/变更管理
    description: ''
paths:
  /incident/list-by-ids:
    post:
      tags:
        - On-call/故障管理
      summary: 批量查询故障
      description: 通过故障 ID 列表批量获取故障信息。
      operationId: incidentListByIds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListIncidentsByIdsRequest'
            example:
              incident_ids:
                - 69da451ef77b1b51f40e83ee
                - 69da451ef77b1b51f40e83ef
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/IncidentListResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  total: 2
                  has_next_page: false
                  items:
                    - incident_id: 69da451ef77b1b51f40e83ee
                      account_id: 2451002751131
                      channel_id: 2551105804131
                      integration_id: 2490562293131
                      integration_ids:
                        - 2490562293131
                      integration_types:
                        - monit.alert
                      dedup_key: 100128:prom-10.99.1.107:A:1579244238440766834:anydata
                      equals_md5: ''
                      start_time: 1775912219
                      end_time: 0
                      last_time: 1775969819
                      ack_time: 0
                      close_time: 0
                      creator_id: 0
                      closer_id: 0
                      owner_id: 0
                      incident_status: Critical
                      incident_severity: Critical
                      progress: Triggered
                      title: CPU usage high - web-server-01
                      description: ''
                      ai_summary: ''
                      impact: ''
                      root_cause: ''
                      resolution: ''
                      num: 0E83EE
                      frequency: frequent
                      created_at: 1775912222
                      updated_at: 1775972145
                      snoozed_before: 0
                      group_method: 'n'
                      ever_muted: false
                      labels: {}
                      fields: {}
                      assigned_to:
                        escalate_rule_id: '000000000000000000000000'
                        layer_idx: 0
                        type: ''
                        assigned_at: 0
                        id: ''
                        escalate_rule_name: ''
                      alert_cnt: 1
                      active_alert_cnt: 1
                      alert_event_cnt: 17
                      responders: []
                      account_name: ''
                      account_locale: ''
                      account_time_zone: ''
                      channel_name: Ops Channel
                      channel_status: enabled
                      detail_url: >-
                        https://app.flashcat.cloud/incident/detail/69da451ef77b1b51f40e83ee
                      silence_url: >-
                        https://app.flashcat.cloud/channel/detail/2551105804131?tab=alertSuppression&fromIncidentId=69da451ef77b1b51f40e83ee
                      integration_type: monit.alert
                      post_mortem_id: ''
                      images: null
                      manual_overrides: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    ListIncidentsByIdsRequest:
      type: object
      description: 按 ID 批量查询故障的参数。
      required:
        - incident_ids
      properties:
        incident_ids:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          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
    IncidentListResponse:
      type: object
      description: 故障分页列表。
      required:
        - items
        - total
        - has_next_page
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/IncidentInfo'
          description: 当前页故障列表。
        total:
          type: integer
          format: int64
          description: 命中总数。
        has_next_page:
          type: boolean
          description: 是否还有更多页。
        search_after_ctx:
          type: string
          description: 下一页翻页游标。
    IncidentInfo:
      type: object
      description: 故障详细信息。
      required:
        - incident_id
        - account_id
        - channel_id
        - integration_id
        - integration_ids
        - integration_types
        - dedup_key
        - equals_md5
        - start_time
        - end_time
        - last_time
        - ack_time
        - close_time
        - creator_id
        - closer_id
        - owner_id
        - incident_status
        - incident_severity
        - progress
        - title
        - description
        - ai_summary
        - impact
        - root_cause
        - resolution
        - num
        - created_at
        - updated_at
        - snoozed_before
        - group_method
        - ever_muted
        - labels
        - fields
        - assigned_to
        - alert_cnt
        - active_alert_cnt
        - alert_event_cnt
        - responders
        - account_name
        - account_locale
        - account_time_zone
        - channel_name
        - channel_status
        - detail_url
        - silence_url
        - post_mortem_id
        - images
        - manual_overrides
      properties:
        incident_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: 故障 ID（MongoDB ObjectID）。
        account_id:
          type: integer
          format: int64
          description: 所属账号 ID。
        channel_id:
          type: integer
          format: int64
          description: 协作空间 ID，独立故障为 0。
        integration_id:
          type: integer
          format: int64
          description: 故障关联的首个集成 ID。
        integration_ids:
          type: array
          items:
            type: integer
            format: int64
          description: 所有为此故障贡献告警的集成 ID。
        integration_types:
          type: array
          items:
            type: string
          description: 所有相关集成的类型。
        dedup_key:
          type: string
          description: 合并告警时使用的去重键。
        equals_md5:
          type: string
          description: 用于内容比对的 MD5 哈希。
        start_time:
          type: integer
          format: int64
          description: 故障开始的 Unix 时间戳（秒）。
        end_time:
          type: integer
          format: int64
          description: 故障结束的 Unix 时间戳（秒），仍活跃时为 0。
        last_time:
          type: integer
          format: int64
          description: 最近一次更新的 Unix 时间戳（秒）。
        ack_time:
          type: integer
          format: int64
          description: 首次认领的 Unix 时间戳（秒），未认领时为 0。
        close_time:
          type: integer
          format: int64
          description: 关闭时间的 Unix 时间戳（秒），仍开启时为 0。
        creator_id:
          type: integer
          format: int64
          description: 创建者成员 ID，系统自动创建时为 0。
        closer_id:
          type: integer
          format: int64
          description: 关闭者成员 ID，自动关闭时为 0。
        owner_id:
          type: integer
          format: int64
          description: 主负责人成员 ID，无则为 0。
        incident_status:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: 当前故障状态，由告警状态推导。
        incident_severity:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: 配置的故障严重程度。
        progress:
          type: string
          enum:
            - Triggered
            - Processing
            - Closed
          description: 故障进展状态。
        title:
          type: string
          description: 故障标题。
        description:
          type: string
          description: 故障描述。
        ai_summary:
          type: string
          description: AI 生成的故障摘要。
        impact:
          type: string
          description: 影响范围描述。
        root_cause:
          type: string
          description: 根因分析。
        resolution:
          type: string
          description: 解决方案说明。
        num:
          type: string
          description: 短标识，可能重复。
        frequency:
          type: string
          description: 频率分布桶，用于分析故障发生模式：`frequent`（频繁）或 `rare`（偶发）。
          enum:
            - frequent
            - rare
        deleted_at:
          type: integer
          format: int64
          description: 软删除时间戳（秒），未删除时为 0。
        created_at:
          type: integer
          format: int64
          description: 创建时间戳（秒）。
        updated_at:
          type: integer
          format: int64
          description: 最后更新时间戳（秒）。
        snoozed_before:
          type: integer
          format: int64
          description: 通知暂停截止时间（Unix 秒），0 表示未暂停。
        group_method:
          type: string
          description: 构建故障时使用的告警聚合方法：`i` 智能聚合、`p` 规则聚合、`n` 不聚合。
          enum:
            - i
            - p
            - 'n'
        ever_muted:
          type: boolean
          description: 该故障是否曾被静默。
        labels:
          type: object
          additionalProperties:
            type: string
          description: 从告警继承的标签。
        fields:
          type: object
          additionalProperties: true
          description: 自定义字段取值，按字段名索引。
        assigned_to:
          $ref: '#/components/schemas/AssignedTo'
        reporter_email:
          type: string
          description: 手工创建故障时的上报者邮箱。
        alert_cnt:
          type: integer
          format: int64
          description: 合并到此故障的告警总数。
        active_alert_cnt:
          type: integer
          format: int64
          description: 当前处于 Critical/Warning/Info 状态的告警数量。
        alert_event_cnt:
          type: integer
          format: int64
          description: 所有合并告警的原始事件总数。
        alerts:
          type: array
          items:
            $ref: '#/components/schemas/AlertInfo'
          description: 关联告警列表，仅在通知模板与自定义动作中填充。
        closer:
          $ref: '#/components/schemas/PersonShort'
          description: 关闭人信息。
        creator:
          $ref: '#/components/schemas/PersonShort'
          description: 创建人信息。
        owner:
          $ref: '#/components/schemas/PersonShort'
          description: 负责人信息，可能已废弃。
          deprecated: true
        responders:
          type: array
          items:
            $ref: '#/components/schemas/Responder'
          description: 当前处理人员列表。
        account_name:
          type: string
          description: 账号名称。
        account_locale:
          type: string
          description: 账号语言。
        account_time_zone:
          type: string
          description: 账号时区。
        channel_name:
          type: string
          description: 协作空间名称。
        channel_status:
          type: string
          description: 协作空间状态。
        detail_url:
          type: string
          description: 前端详情页地址。
        silence_url:
          type: string
          description: 快速静默页面地址。
        links:
          type: array
          items:
            $ref: '#/components/schemas/LinkItem'
          description: 协作空间配置的链接集成。
        integration_type:
          type: string
          description: 首个告警的集成类型，详情页用于标签映射。
        post_mortem_id:
          type: string
          description: 关联的复盘报告 ID，一条故障只能关联一份复盘报告。
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
          description: 附加图片。
        manual_overrides:
          type: array
          items:
            type: string
          description: 被手工覆盖过的字段名列表。
        data_source_id:
          type: integer
          format: int64
          description: 已废弃。请使用 `integration_id`。
          deprecated: true
        data_source_ids:
          type: array
          items:
            type: integer
            format: int64
          description: 已废弃。请使用 `integration_ids`。
          deprecated: true
        data_source_type:
          type: string
          description: 已废弃。请使用 `integration_type`。
          deprecated: true
        data_source_types:
          type: array
          items:
            type: string
          description: 已废弃。请使用 `integration_types`。
          deprecated: true
    ErrorResponse:
      type: object
      description: 错误响应结构。`error` 必填，`data` 不存在。
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    AssignedTo:
      type: object
      description: 故障分派目标。`person_ids` 与 `escalate_rule_id` 至少设置一项。
      properties:
        person_ids:
          type: array
          items:
            type: integer
            format: int64
          minItems: 1
          maxItems: 100
          description: 直接指派的成员 ID 列表。
        escalate_rule_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: 按分派策略指派时使用的策略 ID（MongoDB ObjectID）。
        layer_idx:
          type: integer
          description: 当前环节索引。
        type:
          type: string
          description: >-
            指派类型：`assign` 直接指派、`reassign` 重新指派、`escalate` 分派策略驱动、`reopen`
            重新打开时自动指派。
          enum:
            - assign
            - reassign
            - escalate
            - reopen
        emails:
          type: array
          items:
            type: string
            format: email
          minItems: 1
          maxItems: 100
          description: 邮箱接收人列表，用于 ServiceNow 等外部系统。
        escalate_rule_name:
          type: string
          description: 分派策略名称，由服务端填充。
        assigned_at:
          type: integer
          format: int64
          description: 指派发生的 Unix 时间戳（秒）。
        id:
          type: string
          description: 服务端生成的指派 ID。
    AlertInfo:
      type: object
      description: 告警详情。
      required:
        - alert_id
        - integration_id
        - data_source_id
        - channel_id
        - account_id
        - description
        - title
        - title_rule
        - alert_key
        - alert_severity
        - alert_status
        - start_time
        - last_time
        - end_time
        - labels
        - ever_muted
        - created_at
        - updated_at
        - integration_name
        - integration_type
        - integration_ref_id
        - channel_name
        - channel_status
        - responder_name
        - responder_email
        - event_cnt
        - images
        - data_source_name
        - data_source_ref_id
      properties:
        alert_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: 告警 ID（MongoDB ObjectID）。
        integration_id:
          type: integer
          format: int64
          description: 产生告警的集成 ID。
        data_source_id:
          type: integer
          format: int64
          description: 已废弃，请使用 `integration_id`。
        channel_id:
          type: integer
          format: int64
          description: 协作空间 ID。
        account_id:
          type: integer
          format: int64
          description: 账号 ID。
        description:
          type: string
          description: 告警描述。
        title:
          type: string
          description: 告警标题。
        title_rule:
          type: string
          description: 标题生成规则。
        alert_key:
          type: string
          description: 用于合并事件的去重键。
        alert_severity:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: 当前严重程度。
        alert_status:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: 当前状态。
        start_time:
          type: integer
          format: int64
          description: 告警首次触发的 Unix 时间戳（秒）。
        last_time:
          type: integer
          format: int64
          description: 最近一次事件的 Unix 时间戳（秒）。
        end_time:
          type: integer
          format: int64
          description: 告警恢复的 Unix 时间戳（秒），仍活跃时为 0。
        labels:
          type: object
          additionalProperties:
            type: string
          description: 告警标签。
        ever_muted:
          type: boolean
          description: 该告警是否曾被静默。
        deleted_at:
          type: integer
          format: int64
          description: 软删除时间戳（秒），未删除时为 0。
        created_at:
          type: integer
          format: int64
          description: 创建时间戳（秒）。
        updated_at:
          type: integer
          format: int64
          description: 最后更新时间戳（秒）。
        integration_name:
          type: string
          description: 集成显示名称。
        integration_type:
          type: string
          description: 集成类型。
        integration_ref_id:
          type: string
          description: 集成引用 ID。
        channel_name:
          type: string
          description: 协作空间名称。
        channel_status:
          type: string
          description: 协作空间状态。
        responder_name:
          type: string
          description: 主处理人员名称。
        responder_email:
          type: string
          description: 主处理人员邮箱。
        incident:
          $ref: '#/components/schemas/IncidentShort'
          description: 所属故障引用，若告警已被合并。
        events:
          type: array
          items:
            $ref: '#/components/schemas/AlertEventItem'
          description: 原始告警事件预览，仅在调用方请求时返回；每条告警最多返回最新 20 条。
        event_cnt:
          type: integer
          format: int64
          description: 合并到该告警的原始事件总数。
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
          description: 附加图片。
        data_source_name:
          type: string
          description: 已废弃，请使用 `integration_name`。
        data_source_type:
          type: string
          description: 已废弃，请使用 `integration_type`。
        data_source_ref_id:
          type: string
          description: 已废弃，请使用 `integration_ref_id`。
    PersonShort:
      type: object
      description: Flashduty 成员信息。
      properties:
        person_id:
          type: integer
          format: int64
          description: 成员 ID。
        person_name:
          type: string
          description: 成员显示名称。
        email:
          type: string
          format: email
          description: 成员邮箱。
        as:
          type: string
          description: 成员在当前上下文中的角色标签。
    Responder:
      type: object
      description: 故障处理人员，包含指派与认领时间戳。
      required:
        - person_id
        - assigned_at
        - acknowledged_at
      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
          format: email
          description: 成员邮箱，由服务端填充。
        as:
          type: string
          description: 处理人员角色标签。
    LinkItem:
      type: object
      description: 协作空间级别的链接集成，通过模板渲染生成。
      required:
        - name
        - endpoint
        - open_type
      properties:
        name:
          type: string
          description: 链接显示名称。
        endpoint:
          type: string
          description: 渲染后的链接 URL。
        open_type:
          type: string
          enum:
            - popup
            - tab
          description: 链接打开方式。
    Image:
      type: object
      description: 图片或附件引用。
      required:
        - src
      properties:
        src:
          type: string
          description: 图片来源，可以是 `img_` 上传 token 或 `http(s)` URL。
        href:
          type: string
          description: 可选的图片跳转链接。
        alt:
          type: string
          description: 替代文本。
    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
    IncidentShort:
      type: object
      description: 嵌入告警中的故障简要信息。
      properties:
        incident_id:
          type: string
          description: 故障 ID（ObjectID 十六进制字符串）。
        title:
          type: string
          description: 故障标题。
        progress:
          type: string
          description: 故障处理进度——`Triggered`、`Processing`、`Closed` 之一。
    AlertEventItem:
      type: object
      description: 单条原始告警事件。
      properties:
        event_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: 事件 ID（MongoDB ObjectID）。
        alert_id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: 父告警 ID（MongoDB ObjectID）。
        account_id:
          type: integer
          format: int64
          description: 账户 ID。
        channel_id:
          type: integer
          format: int64
          description: 事件路由到的协作空间 ID。
        integration_id:
          type: integer
          format: int64
          description: 产生该事件的集成 ID。
        integration_type:
          type: string
          description: 产生该事件的集成类型/插件键。
        data_source_id:
          type: integer
          format: int64
          description: 已废弃，请使用 `integration_id`。
        title:
          type: string
          description: 事件标题。
        title_rule:
          type: string
          description: 用于从标签派生 `title` 的标题模板。
        description:
          type: string
          description: 事件描述。
        alert_key:
          type: string
          description: 用于将事件合并到告警的去重键。
        event_severity:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: 事件严重程度。
        event_status:
          type: string
          enum:
            - Critical
            - Warning
            - Info
            - Ok
          description: 事件状态。
        event_time:
          type: integer
          format: int64
          description: 事件时间戳，Unix 时间戳（秒）。
        labels:
          type: object
          additionalProperties:
            type: string
          description: 标签键值对。
        images:
          type: array
          items:
            $ref: '#/components/schemas/AlertImage'
          description: 事件附加的图片。
        created_at:
          type: integer
          format: int64
          description: 记录创建时间，Unix 时间戳（秒）。
        updated_at:
          type: integer
          format: int64
          description: 记录更新时间，Unix 时间戳（秒）。
        deleted_at:
          type: integer
          format: int64
          description: 软删除时间戳（秒），未删除时为 0。
    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
    AlertImage:
      type: object
      description: 告警或事件的图片附件。
      required:
        - src
      properties:
        href:
          type: string
          description: 点击图片时的跳转链接（可选）。
        src:
          type: string
          description: 图片源地址或内部引用（以 `img_` 或 `http` 开头）。
        alt:
          type: string
          description: 替代文本。
  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
        时都必须携带。它等同于所属账户的身份凭证，请妥善保管。

````