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

# 查看仪表盘详情

> 查看单个仪表盘及其当前定义与版本号。

## 限制说明

| 项目 | 说明 |
| - | - |
| 速率限制 | 每个账户 **1,000 次/分钟**；**50 次/秒** |
| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用 |

## 使用说明

* 位于回收站的仪表盘返回 HTTP 410 `DashboardDeleted`，需先恢复；不存在的返回 HTTP 404 `DashboardNotFound`。


## OpenAPI

````yaml /api-reference/rum.openapi.zh.json post /rum/dashboard/get
openapi: 3.1.0
info:
  description: >-
    Flashduty 事件管理平台的公开 HTTP API —— 覆盖故障、通知模板、协作空间、值班排班、监控、RUM、以及平台管理。每次调用都需在
    query 中携带 `app_key`，该 key 在 Flashduty 控制台 我的 → APP Key 中创建（也可放在请求头
    `Fd-App-Key` 中）。所有响应使用统一结构：成功时为 `{ request_id, data }`，失败时为 `{ request_id,
    error }`。
  title: Flashduty 开放 API
  version: 1.0.0
servers:
  - description: Flashduty Open API
    url: https://api.flashcat.cloud
security:
  - AppKeyAuth: []
tags:
  - description: 管理前端性能监控（RUM）应用。
    name: RUM/应用管理
  - description: 对 RUM 事件数据执行分析查询。
    name: RUM/RUM 数据查询
  - description: 查询和管理 RUM 异常追踪 Issue 及预设严重性规则。
    name: RUM/RUM 问题跟踪
  - description: 查询 RUM 自定义字段及其值分布，用于构建分析过滤条件。
    name: RUM/RUM 自定义字段
  - description: 管理和查询用于 Browser、Android、iOS 错误符号化的 RUM Sourcemap 文件。
    name: RUM/RUM Sourcemap
  - description: 查询 RUM 会话的回放元数据与录制分段。
    name: RUM/RUM 会话回放
  - description: 配置和查看决定 RUM 应用采集哪些错误的规则，并可查看其编辑历史。
    name: RUM/错误采集规则
  - description: 管理按应用配置的预设严重性规则，用于为匹配的前端错误指定严重级别，并管理其评估顺序与变更历史。
    name: RUM/Issue 预设严重性规则
  - description: 查询账户的 RUM 资源记录及当前用量。
    name: RUM/资源
  - description: 创建和管理 RUM 自定义仪表盘及其版本历史与回收站。
    name: RUM/仪表盘
paths:
  /rum/dashboard/get:
    post:
      tags:
        - RUM/仪表盘
      summary: 查看仪表盘详情
      description: 查看单个仪表盘及其当前定义与版本号。
      operationId: rum-dashboard-read-get
      requestBody:
        content:
          application/json:
            example:
              dashboard_id: 0192f3a4-5b6c-7d8e-9f01-234567890abc
            schema:
              $ref: '#/components/schemas/RumDashboardIDRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  created_at: 1792401120000
                  created_by:
                    id: 2477033058131
                    name: Alex Chen
                  dashboard_id: 0192f3a4-5b6c-7d8e-9f01-234567890abc
                  definition:
                    default_time_range:
                      from: now-1h
                      to: now
                    description: 商城的加载耗时与错误率。
                    refresh_interval: 1m
                    tabs:
                      - id: 0192f3a4-5b6c-7d8e-9f01-234567890abd
                        sections:
                          - collapsed: false
                            id: 0192f3a4-5b6c-7d8e-9f01-234567890abe
                            panels:
                              - datasource_ref:
                                  datasource_type: rum
                                  kind: fixed
                                grid:
                                  h: 8
                                  w: 16
                                  x: 0
                                  'y': 4
                                id: 0192f3a4-5b6c-7d8e-9f01-234567890ac0
                                queries:
                                  - query:
                                      args:
                                        agg: p95
                                        application_id: qLpu24Dz4CAzWsESPbJYWA
                                        draw_style: bar
                                        field: view.loading_time
                                        group_by: view.url_path
                                        limit: '20'
                                        scope: view
                                      expr: page:${page}
                                      min_step_seconds: 60
                                      mode: range
                                    ref_id: A
                                title: Slowest pages by p95
                                viz_config:
                                  column_options:
                                    A:
                                      display_name: p95
                                      threshold:
                                        critical: 3000
                                        mode: higher_is_worse
                                        warning: 1500
                                      threshold_display: background
                                      unit: milliseconds
                                    view.url_path:
                                      display_name: Page
                                      width_px: 320
                                  kind: table
                                  link_columns:
                                    - dashboard_id: 0192f3a4-5b6c-7d8e-9f01-234567890ac1
                                      pass_time: true
                                      variable_mappings:
                                        page:
                                          column: view.url_path
                                          source: row_column
                                  options:
                                    dense: true
                                  sort:
                                    - direction: desc
                                      field: A
                            title: Slowest pages
                        title: Overview
                        top_panels:
                          - datasource_ref:
                              datasource_type: rum
                              kind: fixed
                            grid:
                              h: 4
                              w: 8
                              x: 0
                              'y': 0
                            id: 0192f3a4-5b6c-7d8e-9f01-234567890abf
                            queries:
                              - legend_alias: p95 loading time
                                query:
                                  args:
                                    agg: p95
                                    application_id: qLpu24Dz4CAzWsESPbJYWA
                                    field: view.loading_time
                                    scope: view
                                  expr: env:${env}
                                  min_step_seconds: 60
                                  mode: range
                                ref_id: A
                            title: p95 loading time
                            viz_config:
                              decimals: 0
                              kind: stat
                              options:
                                sparkline: true
                              reducer: max
                              unit: milliseconds
                              value_fields:
                                - view.loading_time
                    title: Web 性能概览
                    variables:
                      - default:
                          kind: all
                        kind: custom
                        label: Environment
                        name: env
                        options:
                          - text: Production
                            value: prod
                          - text: Staging
                            value: staging
                        selection:
                          include_all: true
                          mode: multi
                      - datasource_ref:
                          datasource_type: rum
                          kind: fixed
                        default:
                          kind: values
                          values:
                            - /checkout
                        kind: query
                        label: Page
                        name: page
                        refresh: on_dashboard_load
                        selection:
                          include_all: false
                          mode: single
                        variable_query:
                          field: view.url_path
                          kind: rum_field
                  revision: 3
                  schema_version: dashboard.v1
                  updated_at: 1792404240000
                  updated_by:
                    id: 2477033058177
                    name: Mei Lin
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - properties:
                      data:
                        $ref: '#/components/schemas/RumDashboardResource'
                    type: object
          description: 成功
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 仪表盘不存在，返回 HTTP 404 `DashboardNotFound`。
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: 仪表盘在回收站中，返回 HTTP 410 `DashboardDeleted`。
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    RumDashboardIDRequest:
      description: 指定单个仪表盘的请求。
      properties:
        dashboard_id:
          description: 仪表盘 ID，规范 UUIDv7。
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
      required:
        - dashboard_id
      type: object
    SuccessEnvelope:
      description: >-
        成功响应结构。2xx 响应中 `request_id` 标识本次调用（同时出现在 `Flashcat-Request-Id`
        响应头中），`data` 为接口业务 payload。失败响应使用不同结构，参见 `ErrorResponse`。
      properties:
        data:
          description: 接口返回的数据，格式见各接口的 200 响应。没有返回数据的接口会返回 `{}` 或完全不带 `data`。
        request_id:
          description: 本次请求的唯一 ID，也会在 Flashcat-Request-Id 响应头中返回。反馈问题时请一并附上。
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          type: string
      required:
        - request_id
      type: object
    RumDashboardResource:
      description: 仪表盘的存储形态，包含当前定义与版本号。
      properties:
        dashboard_id:
          description: 仪表盘 ID，规范 UUIDv7。
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
        schema_version:
          description: 定义所遵循的接口 schema，固定为 `dashboard.v1`。
          enum:
            - dashboard.v1
          type: string
        revision:
          description: 版本号，从 1 开始，每次变更递增。
          minimum: 1
          type: integer
        definition:
          $ref: '#/components/schemas/RumDashboardDefinition'
        created_by:
          $ref: '#/components/schemas/RumDashboardActor'
        updated_by:
          $ref: '#/components/schemas/RumDashboardActor'
        created_at:
          description: 创建时间，Unix 毫秒时间戳。
          format: int64
          type: integer
        updated_at:
          description: 最近修改时间，Unix 毫秒时间戳。
          format: int64
          type: integer
      required:
        - dashboard_id
        - schema_version
        - revision
        - definition
        - created_by
        - updated_by
        - created_at
        - updated_at
      type: object
    ErrorResponse:
      description: 错误响应结构。`error` 必填，`data` 不存在。
      properties:
        error:
          $ref: '#/components/schemas/DutyError'
        request_id:
          description: 本次请求的唯一追踪 ID（trace ID），反馈问题时请提供该值以便检索日志。
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          type: string
      required:
        - request_id
        - error
      type: object
    RumDashboardDefinition:
      description: >-
        仪表盘主体：标题、默认时间范围、变量与页签。一个仪表盘最多 10 个页签、100 个面板、300 条查询。每个页签最多 30 个面板、100
        条查询，固定面板与分区面板合计。
      properties:
        title:
          description: 仪表盘标题，1–189 字符。
          type: string
        description:
          description: 仪表盘描述，最多 1024 字符。
          maxLength: 1024
          type: string
        default_time_range:
          $ref: '#/components/schemas/RumDashboardRelativeTimeRange'
        refresh_interval:
          description: 仪表盘自动刷新间隔，取值 `off`、`30s`、`1m`、`5m` 之一。
          enum:
            - 'off'
            - 30s
            - 1m
            - 5m
          type: string
        variables:
          description: 变量栏项，最多 20 个；内置的 `app` 切换不在其中声明。
          items:
            $ref: '#/components/schemas/RumDashboardVariable'
          maxItems: 20
          type: array
        tabs:
          description: 仪表盘的页签，1–10 个。
          items:
            $ref: '#/components/schemas/RumDashboardTab'
          maxItems: 10
          type: array
      required:
        - title
        - default_time_range
        - refresh_interval
        - variables
        - tabs
      type: object
    RumDashboardActor:
      description: 创建或最近修改仪表盘/版本的成员。
      properties:
        id:
          description: 成员 ID。
          format: int64
          type: integer
        name:
          description: 成员名称。
          type: string
      required:
        - id
        - name
      type: object
    DutyError:
      description: 响应结构中的错误 payload，仅在非 2xx 响应时出现。
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            按响应语言（query 参数 `locale` / `lang` 或请求头
            `Accept-Language`）返回的错误描述，可能包含出错的字段名，请不要解析它。
          example: The specified parameter template_id is not valid.
      required:
        - code
        - message
      type: object
    RumDashboardRelativeTimeRange:
      description: 仪表盘打开时使用的时间范围。`from` 是相对偏移，`to` 固定为 `now`。
      properties:
        from:
          description: >-
            默认时间范围的相对起点，取值
            `now-15m`、`now-30m`、`now-1h`、`now-3h`、`now-6h`、`now-12h`、`now-24h`、`now-7d`
            之一。
          enum:
            - now-15m
            - now-30m
            - now-1h
            - now-3h
            - now-6h
            - now-12h
            - now-24h
            - now-7d
          type: string
        to:
          description: 范围终点，固定为 `now`。
          enum:
            - now
          type: string
      required:
        - from
        - to
      type: object
    RumDashboardVariable:
      description: 变量栏的一项。由 `kind` 决定结构：`custom` 带固定选项列表，`query` 读取某个 RUM 字段的取值。
      discriminator:
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/RumDashboardCustomVariable'
        - $ref: '#/components/schemas/RumDashboardQueryVariable'
    RumDashboardTab:
      description: 仪表盘的一个页签。最多 30 个面板、100 条查询，固定面板与分区面板合计。
      properties:
        id:
          description: 页签 ID，规范 UUIDv7，在仪表盘内唯一。
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
        title:
          description: 页签标题，1–189 字符。
          type: string
        description:
          description: 页签描述，最多 1024 字符。
          maxLength: 1024
          type: string
        top_panels:
          description: 固定在分区上方的面板。
          items:
            $ref: '#/components/schemas/RumDashboardPanel'
          type: array
        sections:
          description: 页签内的分区，最多 10 个。
          items:
            $ref: '#/components/schemas/RumDashboardSection'
          maxItems: 10
          type: array
      required:
        - id
        - title
        - top_panels
        - sections
      type: object
    ErrorCode:
      description: >-
        错误码。所有失败响应都会把 `error.code` 设为下列稳定字符串之一，请以它而不是 HTTP 状态码做判断。


        | 错误码 | HTTP | 含义 |

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

        | `OK` | 200 | 保留值，失败的请求不会返回。 |

        | `InvalidParameter` | 400 | 参数缺失、类型错误或未通过校验，`message` 通常会指出字段名。 |

        | `BadRequest` | 400 | 请求违反业务规则或与对象当前状态冲突，`message` 会说明原因。 |

        | `InvalidContentType` | 400 | 请求体没有以 `application/json` 发送。 |

        | `ResourceNotFound` | 400 | 引用的对象在本账户中不存在或已删除。注意 HTTP 状态码是 400 而不是 404。
        |

        | `NoLicense` | 400 | 账户套餐不包含该功能、套餐配额已用完、套餐已过期或额度不足。 |

        | `ReferenceExist` | 400 | 对象仍被其他对象引用，无法删除。 |

        | `Unauthorized` | 401 | APP Key 缺失、无效或已删除。 |

        | `BalanceNotEnough` | 402 | 仅用于控制台计费流程，Open API 接口不会返回。 |

        | `AccessDenied` | 403 | APP Key 的权限范围或创建者角色不允许该操作或该对象。 |

        | `RouteNotFound` | 404 | 没有与该 HTTP 方法和路径匹配的接口。 |

        | `MethodNotAllowed` | 405 | 路径存在，但不支持该 HTTP 方法。 |

        | `UndonedOrderExist` | 409 | 仅用于控制台计费流程，Open API 接口不会返回。 |

        | `EntityTooLarge` | 413 | 请求体超出大小限制。 |

        | `RequestLocked` | 423 | 仅用于控制台登录保护，Open API 接口不会返回。 |

        | `RequestVerifyRequired` | 428 | 仅用于控制台验证码流程，Open API 接口不会返回。 |

        | `DangerousOperation` | 428 | 仅用于控制台高风险操作的 MFA 校验，Open API 接口不会返回。 |

        | `RequestTooFrequently` | 429 | 触发频率限制；请等待响应头
        `Flashcat-Request-Rate-Limit-Delay` 给出的秒数后再重试。 |

        | `InternalError` | 500 | 服务端意外错误；请退避后重试，反馈问题时附上 `request_id`。 |

        | `ServiceUnavailable` | 503 | 后端依赖过载或不可用，请退避后重试。 |
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - EntityTooLarge
        - RequestLocked
        - RequestVerifyRequired
        - DangerousOperation
        - RequestTooFrequently
        - InternalError
        - ServiceUnavailable
      example: InvalidParameter
      type: string
      x-enumDescriptions:
        OK: 保留值，失败的请求不会返回。
        InvalidParameter: 参数缺失、类型错误或未通过校验，`message` 通常会指出字段名。
        BadRequest: 请求违反业务规则或与对象当前状态冲突，`message` 会说明原因。
        InvalidContentType: 请求体没有以 `application/json` 发送。
        ResourceNotFound: 引用的对象在本账户中不存在或已删除。注意 HTTP 状态码是 400 而不是 404。
        NoLicense: 账户套餐不包含该功能、套餐配额已用完、套餐已过期或额度不足。
        ReferenceExist: 对象仍被其他对象引用，无法删除。
        Unauthorized: APP Key 缺失、无效或已删除。
        BalanceNotEnough: 仅用于控制台计费流程，Open API 接口不会返回。
        AccessDenied: APP Key 的权限范围或创建者角色不允许该操作或该对象。
        RouteNotFound: 没有与该 HTTP 方法和路径匹配的接口。
        MethodNotAllowed: 路径存在，但不支持该 HTTP 方法。
        UndonedOrderExist: 仅用于控制台计费流程，Open API 接口不会返回。
        EntityTooLarge: 请求体超出大小限制。
        RequestLocked: 仅用于控制台登录保护，Open API 接口不会返回。
        RequestVerifyRequired: 仅用于控制台验证码流程，Open API 接口不会返回。
        DangerousOperation: 仅用于控制台高风险操作的 MFA 校验，Open API 接口不会返回。
        RequestTooFrequently: 触发频率限制；请等待响应头 `Flashcat-Request-Rate-Limit-Delay` 给出的秒数后再重试。
        InternalError: 服务端意外错误；请退避后重试，反馈问题时附上 `request_id`。
        ServiceUnavailable: 后端依赖过载或不可用，请退避后重试。
    RumDashboardCustomVariable:
      description: 选项为固定列表的变量。
      properties:
        kind:
          description: 变量类型，固定为 `custom`。
          enum:
            - custom
          type: string
        name:
          description: >-
            变量名，在面板查询中以 `${name}` 引用；1–64 字符，以字母或下划线开头。`app` 和以 `__`
            开头的名称为保留名；变量名不能重复。
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          type: string
        label:
          description: 变量栏展示的文案，填写时为 1 到 189 个字符。
          type: string
        selection:
          $ref: '#/components/schemas/RumDashboardSelectionConfig'
        options:
          description: 固定的可选项列表，1–1000 项，`value` 不能重复。
          items:
            $ref: '#/components/schemas/RumDashboardCandidate'
          type: array
        default:
          $ref: '#/components/schemas/RumDashboardSelection'
      required:
        - kind
        - name
        - selection
        - options
      type: object
    RumDashboardQueryVariable:
      description: 选项取自某个 RUM 字段取值的变量。
      properties:
        kind:
          description: 变量类型，固定为 `query`。
          enum:
            - query
          type: string
        name:
          description: >-
            变量名，在面板查询中以 `${name}` 引用；1–64 字符，以字母或下划线开头。`app` 和以 `__`
            开头的名称为保留名；变量名不能重复。
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          type: string
        label:
          description: 变量栏展示的文案，填写时为 1 到 189 个字符；省略时控制台显示该字段的名称。
          type: string
        selection:
          $ref: '#/components/schemas/RumDashboardSelectionConfig'
        default:
          $ref: '#/components/schemas/RumDashboardSelection'
        datasource_ref:
          $ref: '#/components/schemas/RumDashboardDatasourceRef'
        variable_query:
          $ref: '#/components/schemas/RumDashboardVariableQuery'
        refresh:
          description: 候选值的刷新时机：`on_dashboard_load` 或 `on_time_range_change`。
          enum:
            - on_dashboard_load
            - on_time_range_change
          type: string
      required:
        - kind
        - name
        - selection
        - datasource_ref
        - variable_query
        - refresh
      type: object
    RumDashboardPanel:
      description: 页签中的一个面板。
      properties:
        id:
          description: 面板 ID，规范 UUIDv7，在仪表盘内唯一。
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
        title:
          description: 面板标题，1–189 字符。
          type: string
        description:
          description: 面板描述，最多 1024 字符。
          maxLength: 1024
          type: string
        grid:
          $ref: '#/components/schemas/RumDashboardGridPosition'
        datasource_ref:
          $ref: '#/components/schemas/RumDashboardDatasourceRef'
          description: 除 `text` 外的面板必填；`text` 面板不能传。
        queries:
          description: >-
            面板的查询，各自有唯一的 `ref_id`。`time_series` 和 `top_list` 可有 1 到 26
            个，`table`、`stat`、`bar` 必须恰好 1 个，`text` 不能有。
          items:
            $ref: '#/components/schemas/RumDashboardPanelQuery'
          maxItems: 26
          type: array
        viz_config:
          $ref: '#/components/schemas/RumDashboardVizConfig'
      required:
        - id
        - title
        - grid
        - queries
        - viz_config
      type: object
    RumDashboardSection:
      description: 页签内可折叠的分区。
      properties:
        id:
          description: 分区 ID，规范 UUIDv7，在仪表盘内唯一。
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
        title:
          description: 分区标题，1–189 字符。
          type: string
        description:
          description: 分区描述，最多 1024 字符。
          maxLength: 1024
          type: string
        collapsed:
          description: 分区是否默认折叠。
          type: boolean
        panels:
          description: 分区内的面板。
          items:
            $ref: '#/components/schemas/RumDashboardPanel'
          type: array
      required:
        - id
        - title
        - collapsed
        - panels
      type: object
    RumDashboardSelectionConfig:
      description: 变量栏允许查看者选择值的方式。
      properties:
        mode:
          description: '`single` 只允许一个值，`multi` 允许多个值。'
          enum:
            - single
            - multi
          type: string
        include_all:
          description: 是否提供「全部」项；kind 为 `all` 的选择依赖它。
          type: boolean
      required:
        - mode
      type: object
    RumDashboardCandidate:
      description: 自定义变量的一个可选项。
      properties:
        text:
          description: 变量栏展示的文案，为空时取 `value`，最多 1024 个字符。
          type: string
        value:
          description: 替换进查询的值，1 到 1024 个字符，不能是 `$__all`。
          type: string
      required:
        - value
      type: object
    RumDashboardSelection:
      description: 变量的选中值。
      properties:
        kind:
          description: '`values` 表示选中列出的值；`all` 表示全选，且不能带值。'
          enum:
            - values
            - all
          type: string
        values:
          description: >-
            选中的值。kind 为 `values` 时必填，kind 为 `all` 时不允许出现。不能为空、不能重复，且不能等于
            `$__all`。选择模式 `mode` 为 `single` 时必须恰好一个值。
          items:
            description: 一个可选值。
            type: string
          type: array
      required:
        - kind
      type: object
    RumDashboardDatasourceRef:
      description: 面板或查询变量读取的数据源。RUM 仪表盘只读取内置 RUM 数据源，因此该引用固定。
      properties:
        kind:
          description: 引用类型，固定为 `fixed`。
          enum:
            - fixed
          type: string
        datasource_type:
          description: 数据源类型，固定为 `rum`。
          enum:
            - rum
          type: string
        datasource_id:
          description: 保留字段，内置 RUM 数据源固定为 `0`。
          enum:
            - 0
          type: integer
      required:
        - kind
        - datasource_type
      type: object
    RumDashboardVariableQuery:
      description: 查询变量从哪里取候选值。RUM 只支持列出某个 RUM 字段的取值。
      properties:
        kind:
          description: 查询类型，固定为 `rum_field`。
          enum:
            - rum_field
          type: string
        field:
          description: 作为候选值的 RUM 字段 key。
          type: string
      required:
        - kind
        - field
      type: object
    RumDashboardGridPosition:
      description: 面板在页签 24 列网格上的位置，`x + w` 不得超过 24。同一 `top_panels` 列表或同一分区内的面板不得重叠。
      properties:
        x:
          description: 左边缘所在的列，从 0 开始，取值 0–23。
          minimum: 0
          type: integer
        'y':
          description: 上边缘所在的行，从 0 开始。
          minimum: 0
          type: integer
        w:
          description: 宽度占用的列数，取值 1–24。
          maximum: 24
          minimum: 1
          type: integer
        h:
          description: 高度占用的行数，取值 1–100。
          maximum: 100
          minimum: 1
          type: integer
      required:
        - x
        - 'y'
        - w
        - h
      type: object
    RumDashboardPanelQuery:
      description: 面板内的一条查询，由单个字母引用。
      properties:
        ref_id:
          description: 查询引用，单个大写字母 `A`–`Z`，在面板内唯一。
          pattern: ^[A-Z]$
          type: string
        query:
          $ref: '#/components/schemas/RumDashboardQuery'
        legend_alias:
          description: 该查询序列的图例名，最多 1024 字符。
          maxLength: 1024
          type: string
      required:
        - ref_id
        - query
      type: object
    RumDashboardVizConfig:
      description: >-
        面板如何渲染查询结果。由 `kind` 在
        `time_series`、`table`、`stat`、`bar`、`top_list`、`text` 六种结构中选择。
      discriminator:
        propertyName: kind
      oneOf:
        - $ref: '#/components/schemas/RumDashboardTimeSeriesViz'
        - $ref: '#/components/schemas/RumDashboardTableViz'
        - $ref: '#/components/schemas/RumDashboardStatViz'
        - $ref: '#/components/schemas/RumDashboardBarViz'
        - $ref: '#/components/schemas/RumDashboardTopListViz'
        - $ref: '#/components/schemas/RumDashboardTextViz'
    RumDashboardQuery:
      description: 面板的一个分析问题：DQL 过滤条件，加上分析规格与所读取的应用。
      properties:
        mode:
          description: 查询模式，固定为 `range`。
          enum:
            - range
          type: string
        expr:
          description: >-
            对该范围 RUM 事件的 DQL 过滤条件，最多 16 KiB。`${name}` 必须引用仪表盘中已声明的变量；不支持
            `${name:fmt}` 这类格式化写法，也不允许裸写 `$name`。
          maxLength: 16384
          type: string
        args:
          $ref: '#/components/schemas/RumDashboardQueryArgs'
        min_step_seconds:
          description: 序列的最小步长（秒），是时长而非时间戳。
          format: int64
          minimum: 1
          type: integer
      required:
        - mode
        - expr
        - args
      type: object
    RumDashboardTimeSeriesViz:
      description: 按时间绘制的折线/面积图。
      properties:
        kind:
          description: 面板类型，固定为 `time_series`。
          enum:
            - time_series
          type: string
        options:
          additionalProperties: {}
          description: 随面板保存的自由格式显示选项，不做校验。
          type: object
        unit:
          description: >-
            面板值的展示单位，取值
            `unitless`、`ratio`、`percent`、`milliseconds`、`seconds`、`bytes`、`bits`、`count_per_second`、`bytes_per_second`、`bits_per_second`
            之一。
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          type: string
        decimals:
          description: 展示的小数位数。
          maximum: 15
          minimum: 0
          type: integer
        threshold:
          $ref: '#/components/schemas/RumDashboardThreshold'
      required:
        - kind
        - options
      type: object
    RumDashboardTableViz:
      description: 分组行的表格。
      properties:
        kind:
          description: 面板类型，固定为 `table`。
          enum:
            - table
          type: string
        options:
          additionalProperties: {}
          description: 随面板保存的自由格式显示选项，不做校验。
          type: object
        column_options:
          additionalProperties:
            $ref: '#/components/schemas/RumDashboardColumnOption'
          description: 按列名给出的列展示配置，最多 100 列。
          type: object
        sort:
          description: 表格的初始排序。
          items:
            $ref: '#/components/schemas/RumDashboardFieldSort'
          type: array
        link_columns:
          description: 作为额外列渲染的跳转链接。与 `column_options` 中的 `data_link` 合计，每个表格最多 5 个。
          items:
            $ref: '#/components/schemas/RumDashboardDataLink'
          type: array
      required:
        - kind
        - options
      type: object
    RumDashboardStatViz:
      description: 归约后的单个数值。
      properties:
        kind:
          description: 面板类型，固定为 `stat`。
          enum:
            - stat
          type: string
        options:
          additionalProperties: {}
          description: 随面板保存的自由格式显示选项，不做校验。
          type: object
        unit:
          description: >-
            面板值的展示单位，取值
            `unitless`、`ratio`、`percent`、`milliseconds`、`seconds`、`bytes`、`bits`、`count_per_second`、`bytes_per_second`、`bits_per_second`
            之一。
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          type: string
        decimals:
          description: 展示的小数位数。
          maximum: 15
          minimum: 0
          type: integer
        threshold:
          $ref: '#/components/schemas/RumDashboardThreshold'
        value_fields:
          description: 取其值归约为展示数值的字段 key。不能为空、名称不能重复；不允许使用 `frame_index` 和 `field_index`。
          items:
            description: 字段 key。
            type: string
          type: array
        reducer:
          description: 把多条序列归约成单个值的方式，取值 `last_non_null`、`min`、`max`、`mean`、`sum` 之一。
          enum:
            - last_non_null
            - min
            - max
            - mean
            - sum
          type: string
      required:
        - kind
        - options
        - value_fields
        - reducer
      type: object
    RumDashboardBarViz:
      description: 由分组序列构成的分类柱状图。
      properties:
        kind:
          description: 面板类型，固定为 `bar`。
          enum:
            - bar
          type: string
        options:
          additionalProperties: {}
          description: 随面板保存的自由格式显示选项，不做校验。
          type: object
        unit:
          description: >-
            面板值的展示单位，取值
            `unitless`、`ratio`、`percent`、`milliseconds`、`seconds`、`bytes`、`bits`、`count_per_second`、`bytes_per_second`、`bits_per_second`
            之一。
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          type: string
        decimals:
          description: 展示的小数位数。
          maximum: 15
          minimum: 0
          type: integer
        threshold:
          $ref: '#/components/schemas/RumDashboardThreshold'
        category_field:
          description: 提供分类轴的字段 key。
          type: string
        value_fields:
          description: 作为柱子的字段 key。不能为空、名称不能重复；不允许使用 `frame_index` 和 `field_index`。
          items:
            description: 字段 key。
            type: string
          type: array
        data_link:
          $ref: '#/components/schemas/RumDashboardDataLink'
      required:
        - kind
        - options
        - category_field
        - value_fields
      type: object
    RumDashboardTopListViz:
      description: 归约后按值排序的条形榜。
      properties:
        kind:
          description: 面板类型，固定为 `top_list`。
          enum:
            - top_list
          type: string
        options:
          additionalProperties: {}
          description: 随面板保存的自由格式显示选项，不做校验。
          type: object
        unit:
          description: >-
            面板值的展示单位，取值
            `unitless`、`ratio`、`percent`、`milliseconds`、`seconds`、`bytes`、`bits`、`count_per_second`、`bytes_per_second`、`bits_per_second`
            之一。
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          type: string
        decimals:
          description: 展示的小数位数。
          maximum: 15
          minimum: 0
          type: integer
        threshold:
          $ref: '#/components/schemas/RumDashboardThreshold'
        reducer:
          description: 把多条序列归约成单个值的方式，取值 `last_non_null`、`min`、`max`、`mean`、`sum` 之一。
          enum:
            - last_non_null
            - min
            - max
            - mean
            - sum
          type: string
        sort:
          description: 排名方向：`asc` 或 `desc`。
          enum:
            - asc
            - desc
          type: string
        limit:
          description: 展示的条数，1–100；省略表示全部展示。
          maximum: 100
          minimum: 1
          type: integer
      required:
        - kind
        - options
        - reducer
        - sort
      type: object
    RumDashboardTextViz:
      description: Markdown 文本块。
      properties:
        kind:
          description: 面板类型，固定为 `text`。
          enum:
            - text
          type: string
        options:
          additionalProperties: {}
          description: 随面板保存的自由格式显示选项，不做校验。
          type: object
        markdown:
          description: >-
            Markdown 正文，最多 64 KiB。文本面板不接数据源与查询。不允许图片、原始 HTML 和 `${` 模板；链接须为
            HTTPS 或以 `/` 开头。
          maxLength: 65536
          type: string
      required:
        - kind
        - options
        - markdown
      type: object
    RumDashboardQueryArgs:
      additionalProperties: false
      description: 查询的分析规格：读取哪个范围、用什么聚合、哪个字段与如何分组。未知键会被拒绝。
      properties:
        scope:
          description: >-
            查询读取的 RUM 探索范围，取值
            `session`、`view`、`resource`、`action`、`error`、`long_task`、`vital` 之一。
          enum:
            - session
            - view
            - resource
            - action
            - error
            - long_task
            - vital
          type: string
        agg:
          description: >-
            对该范围施加的聚合方式，取值
            `count`、`count_distinct`、`avg`、`sum`、`min`、`max`、`p50`、`p75`、`p90`、`p95`、`p99`
            之一。
          enum:
            - count
            - count_distinct
            - avg
            - sum
            - min
            - max
            - p50
            - p75
            - p90
            - p95
            - p99
          type: string
        field:
          description: 聚合读取的字段 key。`agg` 为 `count` 时可省略。
          type: string
        group_by:
          description: >-
            分组字段，1 到 255 个字符。不能是 `session_id`、`view_id` 等事件 ID。对高基数字段分组时，`agg`
            只能是 `count` 或 `sum`。
          maxLength: 255
          type: string
        limit:
          description: 返回的序列数上限，取值 `5`、`10`、`20`、`50` 之一。
          enum:
            - '5'
            - '10'
            - '20'
            - '50'
          type: string
        draw_style:
          description: 序列的绘制方式：`line` 或 `bar`。
          enum:
            - line
            - bar
          type: string
        application_id:
          description: >-
            查询读取的应用：具体的应用 ID，或 `$app`（跟随仪表盘上选中的应用）。必填，最多 64
            个字符。应用不存在或您无权读取时保存失败。
          maxLength: 64
          type: string
      required:
        - scope
        - agg
        - application_id
      type: object
    RumDashboardThreshold:
      description: 数值面板上绘制的警告/严重阈值。`warning` 和 `critical` 至少填一个。
      properties:
        mode:
          description: 哪个方向更严重：`higher_is_worse` 或 `lower_is_worse`。
          enum:
            - higher_is_worse
            - lower_is_worse
          type: string
        warning:
          description: 警告阈值。`mode` 为 `higher_is_worse` 时不得高于 `critical`，反之不得低于。
          type: number
        critical:
          description: 严重阈值。
          type: number
      required:
        - mode
      type: object
    RumDashboardColumnOption:
      description: 表格面板某一列的展示配置。
      properties:
        display_name:
          description: 列标题，为空时取字段 key。
          type: string
        hidden:
          description: 是否隐藏该列。`false` 表示不隐藏；省略表示沿用默认。
          type:
            - boolean
            - 'null'
        width_px:
          description: 列宽（像素），80 到 1200。
          type:
            - integer
            - 'null'
          minimum: 80
          maximum: 1200
        unit:
          description: >-
            面板值的展示单位，取值
            `unitless`、`ratio`、`percent`、`milliseconds`、`seconds`、`bytes`、`bits`、`count_per_second`、`bytes_per_second`、`bits_per_second`
            之一。
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          type: string
        threshold:
          $ref: '#/components/schemas/RumDashboardThreshold'
        threshold_display:
          description: 阈值绘制方式：`text` 给数值着色，`background` 给单元格着色。
          enum:
            - text
            - background
          type: string
        data_link:
          $ref: '#/components/schemas/RumDashboardDataLink'
      type: object
    RumDashboardFieldSort:
      description: 表格列的排序方式。
      properties:
        field:
          description: 排序使用的字段 key。
          type: string
        direction:
          description: 排序方向：`asc` 或 `desc`。
          enum:
            - asc
            - desc
          type: string
      required:
        - field
        - direction
      type: object
    RumDashboardDataLink:
      description: 从面板单元格跳转到另一个仪表盘。
      properties:
        dashboard_id:
          description: 目标仪表盘 ID，规范 UUIDv7。
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
        target_id:
          description: 仪表盘内的目标页签或面板 ID，设置时须为规范 UUIDv7。
          pattern: >-
            ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          type: string
        pass_time:
          description: 是否把当前时间范围传过去。
          type: boolean
        variable_mappings:
          additionalProperties:
            $ref: '#/components/schemas/RumDashboardLinkMapping'
          description: 目标变量名到取值映射的关系。
          type: object
      required:
        - dashboard_id
        - pass_time
        - variable_mappings
      type: object
    RumDashboardLinkMapping:
      description: 跳转时目标仪表盘的某个变量如何取值。
      properties:
        source:
          description: >-
            取值来源：`variable`（另一个变量）、`row_column`（点击行的列），柱状面板还可为
            `category`、`series`、`value`。
          enum:
            - variable
            - row_column
            - category
            - series
            - value
          type: string
        column:
          description: '`row_column` 来源的列名，最多 1024 字符。'
          maxLength: 1024
          type: string
        name:
          description: '`variable` 来源的变量名；1–64 字符，以字母或下划线开头。'
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          type: string
      required:
        - source
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          examples:
            missingParameter:
              value:
                error:
                  code: InvalidParameter
                  message: The specified parameter is not valid.
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: 请求非法 — 通常是参数缺失或格式不正确。
    Unauthorized:
      content:
        application/json:
          examples:
            missingAppKey:
              value:
                error:
                  code: Unauthorized
                  message: You are unauthorized.
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: app_key 缺失或无效。
    Forbidden:
      content:
        application/json:
          examples:
            noEditPermission:
              value:
                error:
                  code: AccessDenied
                  message: Access Denied.
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: app_key 有效，但其权限范围或创建者角色不允许该操作或该对象。
    TooManyRequests:
      content:
        application/json:
          examples:
            rateLimited:
              value:
                error:
                  code: RequestTooFrequently
                  message: Request too frequently.
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: >-
        触发频率限制（账户级限制或该接口的平台级上限）。请等待响应头 `Flashcat-Request-Rate-Limit-Delay`
        给出的秒数后重试。
      headers:
        Flashcat-Request-Rate-Limit-Delay:
          description: 距当前限流窗口重置的秒数。请求被网关全局保护限流拒绝时不返回该响应头。
          schema:
            type: integer
            minimum: 0
    ServerError:
      content:
        application/json:
          examples:
            internal:
              value:
                error:
                  code: InternalError
                  message: >-
                    We encountered an internal error, and it has been reported.
                    Please try again later.
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: 服务端未预期错误。反馈问题时请携带 request_id。
  securitySchemes:
    AppKeyAuth:
      description: >-
        在 Flashduty 控制台 我的 → APP Key 中创建的 APP Key。可通过 query 参数 `app_key` 或请求头
        `Fd-App-Key` 传入。实际可访问范围是该 APP Key 的权限范围与创建者当前角色权限的交集，请妥善保管。
      in: query
      name: app_key
      type: apiKey

````

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