> ## 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.

# 预览草稿变量

> 解析尚未存入任何仪表盘的草稿变量组。



## OpenAPI

````yaml /api-reference/monitors.openapi.zh.json post /monit/dashboard/runtime/variables/preview
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: Monitors/告警规则
    description: 创建、管理和导出监控告警规则，查询规则统计和审计历史。
  - name: Monitors/告警数据源
    description: 管理监控告警规则用于查询指标的数据源。
  - name: Monitors/诊断分析
    description: Flashduty AI SRE 使用的诊断与查询接口——数据源即席查询、日志/指标诊断,以及监控对象侧的工具调用。
  - name: Monitors/通用工具
    description: 监控服务开通及数据预览工具。
  - name: Monitors/仪表盘
    description: 创建、搜索、版本化与运行 Monitors 仪表盘，并解析其变量与查询。
  - name: Monitors/规则分组
    description: 列出仪表盘与告警规则所在的监控节点树。
paths:
  /monit/dashboard/runtime/variables/preview:
    post:
      tags:
        - Monitors/仪表盘
      summary: 预览草稿变量
      description: 解析尚未存入任何仪表盘的草稿变量组。
      operationId: monit-dashboard-variable-read-preview
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DashboardVariablesPreviewRequest'
            example:
              context:
                kind: new
                folder_id: 12
              variables:
                - kind: custom
                  name: env
                  label: Environment
                  selection:
                    mode: single
                    include_all: false
                  options:
                    - text: Production
                      value: prod
                    - text: Staging
                      value: staging
                  default:
                    kind: values
                    values:
                      - prod
              selections:
                env:
                  kind: values
                  values:
                    - prod
              time:
                from_ms: 1791100800000
                to_ms: 1791104400000
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DashboardVariablesPreviewResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  variables:
                    - name: env
                      kind: custom
                      candidates:
                        - text: Production
                          value: prod
                        - text: Staging
                          value: staging
                      selection:
                        kind: values
                        values:
                          - prod
                  selections:
                    env:
                      kind: values
                      values:
                        - prod
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    DashboardVariablesPreviewRequest:
      type: object
      description: 解析一组尚未存入任何仪表盘的草稿变量。
      properties:
        context:
          $ref: '#/components/schemas/DashboardDraftContext'
        variables:
          type: array
          items:
            $ref: '#/components/schemas/DashboardVariable'
          maxItems: 20
          description: 草稿变量，最多 20 个。
        selections:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DashboardSelection'
          description: 按变量名索引的选择，最多 20 项。
        time:
          $ref: '#/components/schemas/DashboardAbsoluteTimeRange'
      required:
        - context
        - variables
        - selections
        - time
    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
    DashboardVariablesPreviewResponse:
      type: object
      description: 已解析的草稿变量。因为没有落库，所以不返回 `dashboard_id`。
      properties:
        variables:
          type: array
          items:
            $ref: '#/components/schemas/DashboardResolvedVariable'
          description: 已解析的变量。
        selections:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DashboardSelection'
          description: 按变量名索引的生效选择。
      required:
        - variables
        - selections
    DashboardDraftContext:
      type: object
      description: 未保存的草稿面板/变量集所属的上下文。`existing` 指向已存仪表盘，`new` 指向尚无仪表盘的目录——两者互斥。
      properties:
        kind:
          type: string
          enum:
            - existing
            - new
          description: >-
            草稿上下文类型：`existing` = 指向已存储的仪表盘（必须给出 `dashboard_id`）；`new` =
            指向尚不包含仪表盘的目录（必须给出 `folder_id`）。
        dashboard_id:
          type: string
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          description: '`existing` 时必填，`new` 时禁止设置。'
        folder_id:
          type: integer
          format: uint64
          minimum: 1
          description: '`new` 时必填，`existing` 时禁止设置。'
      required:
        - kind
    DashboardVariable:
      description: 仪表盘变量。按 `kind` 选择对应分支。
      oneOf:
        - $ref: '#/components/schemas/DashboardDatasourceVariable'
        - $ref: '#/components/schemas/DashboardCustomVariable'
        - $ref: '#/components/schemas/DashboardQueryVariable'
      discriminator:
        propertyName: kind
        mapping:
          datasource: '#/components/schemas/DashboardDatasourceVariable'
          custom: '#/components/schemas/DashboardCustomVariable'
          query: '#/components/schemas/DashboardQueryVariable'
    DashboardSelection:
      type: object
      description: 变量取值的具体选择。空的 `values` 数组是合法输入，表示未解析——服务端不会为其回退到默认值。
      properties:
        kind:
          type: string
          enum:
            - values
            - all
          description: '`values` 选择列出的项，`all` 表示全选（仅当 `include_all` 为 true 时可用）。'
        values:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 1024
          maxItems: 1000
          description: 已选值，需唯一且不得为 `$__all`。`kind` 为 `all` 时必须为空。
      required:
        - kind
    DashboardAbsoluteTimeRange:
      type: object
      description: >-
        绝对求值窗口。两个边界都是 Unix 毫秒时间戳，`from_ms` 必须小于 `to_ms`，且都不得超过 JavaScript
        安全整数上限。
      properties:
        from_ms:
          type: integer
          format: int64
          minimum: 0
          description: Unix 时间戳（毫秒）。
        to_ms:
          type: integer
          format: int64
          minimum: 1
          description: Unix 时间戳（毫秒）。
      required:
        - from_ms
        - to_ms
    DashboardResolvedVariable:
      type: object
      description: 单个已解析变量。数据源不可达、表达式错误或结果为空时，`candidates` 会不完整并填充 `error`，而不是让请求整体失败。
      properties:
        name:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          description: 变量名。
        kind:
          type: string
          enum:
            - datasource
            - custom
            - query
          description: 变量类型：`datasource` = 选择数据源；`custom` = 内联固定列表；`query` = 通过执行查询解析。
        candidates:
          type: array
          items:
            $ref: '#/components/schemas/DashboardCandidate'
          description: 解析出的候选项，最多 1000 个。
        selection:
          $ref: '#/components/schemas/DashboardSelection'
        datasource:
          $ref: '#/components/schemas/DashboardRuntimeDatasource'
        error:
          $ref: '#/components/schemas/DashboardRuntimeError'
      required:
        - name
        - kind
        - candidates
    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
    DashboardDatasourceVariable:
      type: object
      description: 数据源选择变量。候选项为账户下 `datasource_type` 类型的数据源。
      properties:
        kind:
          type: string
          enum:
            - datasource
          description: 变量类型判别字段，固定为 `datasource`，表示选择一个数据源。
        name:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          description: 在 `{{ }}` 模板中引用的变量名，最多 64 个字符。
        label:
          type: string
          maxLength: 189
          description: 可选展示名，缺省时使用 `name`。
        datasource_type:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: 候选项来自的数据源类型。
        name_patterns:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 189
          maxItems: 10
          description: 缩小候选范围的通配符，空表示该类型下的全部数据源。
        default_datasource_id:
          type: integer
          format: uint64
          description: 默认数据源 ID。若默认值不可用，运行时按名称、再按 ID 取第一个候选项。
      required:
        - kind
        - name
        - datasource_type
    DashboardCustomVariable:
      type: object
      description: 候选项来自内联固定列表的变量。
      properties:
        kind:
          type: string
          enum:
            - custom
          description: 变量类型判别字段，固定为 `custom`，表示候选来自内联提供的固定列表。
        name:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          description: 在 `{{ }}` 模板中引用的变量名，最多 64 个字符。
        label:
          type: string
          maxLength: 189
          description: 可选展示名，缺省时使用 `name`。
        selection:
          $ref: '#/components/schemas/DashboardSelectionConfig'
        options:
          type: array
          items:
            $ref: '#/components/schemas/DashboardCandidate'
          minItems: 1
          maxItems: 1000
          description: 候选项列表，1～1000 条。取值非空、唯一，且不得为 `$__all`。
        default:
          $ref: '#/components/schemas/DashboardSelection'
      required:
        - kind
        - name
        - selection
        - options
    DashboardQueryVariable:
      type: object
      description: 通过向数据源执行查询来解析候选项的变量。
      properties:
        kind:
          type: string
          enum:
            - query
          description: 变量类型判别字段，固定为 `query`，表示候选通过对数据源执行查询解析得到。
        name:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          description: 在 `{{ }}` 模板中引用的变量名，最多 64 个字符。
        label:
          type: string
          maxLength: 189
          description: 可选展示名，缺省时使用 `name`。
        selection:
          $ref: '#/components/schemas/DashboardSelectionConfig'
        default:
          $ref: '#/components/schemas/DashboardSelection'
        datasource_ref:
          $ref: '#/components/schemas/DashboardDatasourceRef'
        variable_query:
          $ref: '#/components/schemas/DashboardVariableQuery'
        refresh:
          type: string
          enum:
            - on_dashboard_load
            - on_time_range_change
          description: >-
            候选项的重新计算时机：`on_dashboard_load` = 仪表盘加载时计算一次；`on_time_range_change` =
            时间范围每次变化时重新计算。
      required:
        - kind
        - name
        - selection
        - datasource_ref
        - variable_query
        - refresh
    DashboardCandidate:
      type: object
      description: 自定义变量的一个候选项。
      properties:
        text:
          type: string
          minLength: 1
          maxLength: 1024
          description: 选择器中展示的文案。
        value:
          type: string
          minLength: 1
          maxLength: 1024
          description: 替换进模板的取值。
      required:
        - text
        - value
    DashboardRuntimeDatasource:
      type: object
      description: 运行时查询实际绑定的数据源。
      properties:
        id:
          type: integer
          format: uint64
          minimum: 1
          description: 数据源 ID。
        type:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: 数据源类型标识。
        name:
          type: string
          description: 数据源名称。
      required:
        - id
        - type
        - name
    DashboardRuntimeError:
      type: object
      description: 变量级或查询级的失败。单个分支失败不会导致整个调用失败。
      properties:
        reason:
          type: string
          description: >-
            机器可读的失败原因。已观察到的取值包括
            `invalid_request`、`variable_invalid`、`panel_missing`、`field_missing`、`datasource_permission_denied`、`timeout`、`panel_deadline`、`panel_canceled`、`canceled`、`overloaded`、`source_too_large`、`edge_unavailable`、`edge_upgrade_required`、`edge_version_unknown`、`mixed_edge_versions`、`internal`。
        message:
          type: string
          description: 失败的可读详情。
      required:
        - reason
        - message
    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.
        reason:
          description: 可选的机器可读拒绝原因，包含数据源工具错误；结合 HTTP 状态及 code 判断。
          type: string
          x-flashduty-preserve-absence: true
      required:
        - code
        - message
    DashboardSelectionConfig:
      type: object
      description: 变量的选择数量约束。
      properties:
        mode:
          type: string
          enum:
            - single
            - multi
          description: 选择基数：`single` 表示解析后的选择恰好一个值；`multi` 表示允许选择多个值。
        include_all:
          type: boolean
          description: 为 true 时该变量额外提供 `all` 选项。
      required:
        - mode
        - include_all
    DashboardDatasourceRef:
      type: object
      description: 把面板或查询变量指向某个数据源——可以是固定 ID，也可以是渲染时求值的数据源变量。
      properties:
        kind:
          type: string
          enum:
            - fixed
            - variable
          description: '`fixed` 使用 `datasource_id`；`variable` 用 `name` 引用某个数据源变量。'
        datasource_id:
          type: integer
          format: uint64
          minimum: 1
          description: 数据源 ID。`kind` 为 `fixed` 时必填，为 `variable` 时禁止设置。
        name:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          description: 数据源变量名。`kind` 为 `variable` 时必填，为 `fixed` 时禁止设置。
        datasource_type:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: 数据源类型标识，例如 `prometheus`、`victorialogs`。
      required:
        - kind
        - datasource_type
    DashboardVariableQuery:
      description: 变量查询。按 `kind` 选择分支；分支需与所引用数据源类型一致。
      oneOf:
        - $ref: '#/components/schemas/DashboardPrometheusVariableQuery'
        - $ref: '#/components/schemas/DashboardSQLVariableQuery'
        - $ref: '#/components/schemas/DashboardLogsVariableQuery'
      discriminator:
        propertyName: kind
        mapping:
          prometheus: '#/components/schemas/DashboardPrometheusVariableQuery'
          sql: '#/components/schemas/DashboardSQLVariableQuery'
          logs: '#/components/schemas/DashboardLogsVariableQuery'
    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
    DashboardPrometheusVariableQuery:
      type: object
      description: Prometheus 标签取值查询。
      properties:
        kind:
          type: string
          enum:
            - prometheus
          description: 查询类型判别字段，固定为 `prometheus`，表示对 Prometheus 执行标签值查询。
        label:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_:.\-]{0,189}$
          description: 取值作为候选项的标签。
        metric:
          type: string
          description: 可选指标名，用于限定参与计算的序列。
        label_filters:
          type: array
          items:
            $ref: '#/components/schemas/DashboardLabelFilter'
          description: 可选匹配条件，在读取标签取值前先缩小序列范围。
      required:
        - kind
        - label
    DashboardSQLVariableQuery:
      type: object
      description: 返回一列候选项的 SQL 查询。
      properties:
        kind:
          type: string
          enum:
            - sql
          description: 查询类型判别字段，固定为 `sql`，表示执行返回单列候选的 SQL 查询。
        expr:
          type: string
          description: SQL 语句；可通过 `{{ }}` 引用其他变量。
        args:
          type: object
          additionalProperties:
            type: string
          description: 具名查询参数；默认为空对象。
        text_field:
          type: string
          description: 作为候选项文案的列；默认与取值列相同。
        value_field:
          type: string
          minLength: 1
          description: 作为候选项取值的列。
      required:
        - kind
        - expr
        - args
        - value_field
    DashboardLogsVariableQuery:
      type: object
      description: 返回某字段取值作为候选项的日志查询。
      properties:
        kind:
          type: string
          enum:
            - logs
          description: 查询类型判别字段，固定为 `logs`，表示执行返回某个字段取值作为候选的日志查询。
        expr:
          type: string
          description: 日志查询表达式；可通过 `{{ }}` 引用其他变量。
        args:
          type: object
          additionalProperties:
            type: string
          description: 具名查询参数；默认为空对象。
        field:
          type: string
          minLength: 1
          description: 取值作为候选项的日志字段。
      required:
        - kind
        - expr
        - args
        - field
    DashboardLabelFilter:
      type: object
      description: Prometheus 标签匹配条件。
      properties:
        label:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_:.\-]{0,189}$
          description: 标签名。
        op:
          type: string
          enum:
            - '='
            - '!='
            - '=~'
            - '!~'
          description: 匹配操作符：`=` = 等于；`!=` = 不等于；`=~` = 正则匹配；`!~` = 正则不匹配。
        value:
          type: string
          minLength: 1
          description: 匹配值；可通过 `{{ }}` 引用其他变量。
      required:
        - label
        - op
        - value
  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.
    Forbidden:
      description: app_key 有效但没有执行该操作的权限。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            noEditPermission:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: AccessDenied
                  message: Access Denied.
    NotFound:
      description: >-
        目标资源不存在或已被删除。注意：Flashduty 对业务实体的缺失通常返回 HTTP 400 +
        code=`ResourceNotFound`，真正的 404 只用于未知路由。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            resourceMissing:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: ResourceNotFound
                  message: The resource you request is not found
    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
        时都必须携带。它等同于所属账户的身份凭证，请妥善保管。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.