> ## 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/outline
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/outline:
    post:
      tags:
        - Monitors/仪表盘
      summary: 获取仪表盘大纲
      description: 获取仪表盘结构，不含查询与定义。
      operationId: monit-dashboard-read-outline
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DashboardOutlineRequest'
            example:
              dashboard_id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2101
              target_id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2404
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DashboardOutline'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  dashboard:
                    dashboard_id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2101
                    title: Checkout service overview
                    description: Traffic, errors and dependencies for the checkout service.
                    revision: 7
                    updated_at: 1791100800
                  folder:
                    folder_id: 12
                    breadcrumb:
                      - Production
                      - Checkout
                  variables:
                    - name: env
                      label: Environment
                      kind: custom
                      selection:
                        mode: single
                        include_all: false
                  tabs:
                    - id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2202
                      title: Overview
                      description: Golden signals.
                      breadcrumb:
                        - Checkout service overview
                        - Overview
                      top_panels: []
                      sections:
                        - id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2303
                          title: Traffic
                          description: Request rate and latency.
                          breadcrumb:
                            - Checkout service overview
                            - Overview
                            - Traffic
                          panels:
                            - id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2404
                              title: Request rate
                              breadcrumb:
                                - Checkout service overview
                                - Overview
                                - Traffic
                                - Request rate
                              viz_config:
                                kind: time_series
                              datasource_type: prometheus
        '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:
    DashboardOutlineRequest:
      type: object
      description: 请求大纲，可收窄到某个 tab、section 或 panel。
      properties:
        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: 仪表盘的 canonical UUIDv7。
        target_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: 可选的 tab/section/panel ID。设置后响应只保留包含它的分支；ID 不存在时返回 `TargetNotFound`。
      required:
        - dashboard_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
    DashboardOutline:
      type: object
      description: >-
        仪表盘的结构大纲——只含标题、面包屑与可视化类型，不含查询和定义。传入 `target_id` 可把大纲收窄到某个 tab、section 或
        panel。
      properties:
        dashboard:
          $ref: '#/components/schemas/DashboardOutlineInfo'
        folder:
          $ref: '#/components/schemas/DashboardOutlineFolder'
        variables:
          type: array
          items:
            $ref: '#/components/schemas/DashboardOutlineVariable'
          description: 变量摘要。
        tabs:
          type: array
          items:
            $ref: '#/components/schemas/DashboardOutlineTab'
          description: Tab 列表；传入 `target_id` 时会相应收窄。
      required:
        - dashboard
        - folder
        - variables
        - tabs
    DashboardOutlineInfo:
      type: object
      description: 仪表盘级大纲条目。
      properties:
        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: 仪表盘 ID。
        title:
          type: string
          description: 仪表盘标题。
        description:
          type: string
          description: 仪表盘描述；未设置时为空串。
        revision:
          type: integer
          format: uint64
          minimum: 1
          description: 当前版本号。
        updated_at:
          type: integer
          format: int64
          description: Unix 时间戳（秒）。
      required:
        - dashboard_id
        - title
        - revision
        - updated_at
    DashboardOutlineFolder:
      type: object
      description: 大纲中的目录位置。
      properties:
        folder_id:
          type: integer
          format: uint64
          minimum: 1
          description: 目录 ID。
        breadcrumb:
          type: array
          items:
            type: string
          description: 从根目录开始的目录名路径。
      required:
        - folder_id
        - breadcrumb
    DashboardOutlineVariable:
      type: object
      description: 大纲中的变量摘要。
      properties:
        name:
          type: string
          pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
          description: 变量名。
        label:
          type: string
          description: 展示名；未设置时为空串。
        kind:
          type: string
          enum:
            - datasource
            - custom
            - query
          description: 变量类型：`datasource` = 选择数据源；`custom` = 内联固定列表；`query` = 通过执行查询解析。
        selection:
          $ref: '#/components/schemas/DashboardSelectionConfig'
      required:
        - name
        - kind
    DashboardOutlineTab:
      type: object
      description: 大纲中的 tab 条目及其面包屑。
      properties:
        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: Tab ID。
        title:
          type: string
          description: Tab 标题。
        description:
          type: string
          description: Tab 描述；未设置时为空串。
        breadcrumb:
          type: array
          items:
            type: string
          description: 仪表盘标题 + 该 tab 标题。
        top_panels:
          type: array
          items:
            $ref: '#/components/schemas/DashboardOutlinePanel'
          description: 直接放在该 tab 上的面板。
        sections:
          type: array
          items:
            $ref: '#/components/schemas/DashboardOutlineSection'
          description: 该 tab 下的 section。
      required:
        - id
        - title
        - breadcrumb
        - top_panels
        - sections
    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
    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
    DashboardOutlinePanel:
      type: object
      description: 大纲中的面板条目。
      properties:
        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: 面板 ID。
        title:
          type: string
          description: 面板标题。
        description:
          type: string
          description: 面板描述；未设置时为空串。
        breadcrumb:
          type: array
          items:
            type: string
          description: 从仪表盘到该面板的完整标题路径。
        viz_config:
          $ref: '#/components/schemas/DashboardOutlineVizConfig'
        datasource_type:
          type: string
          description: 面板查询的数据源类型；面板无数据源（text 面板）时为空串。
      required:
        - id
        - title
        - breadcrumb
        - viz_config
    DashboardOutlineSection:
      type: object
      description: 大纲中的 section 条目。
      properties:
        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: Section ID。
        title:
          type: string
          description: Section 标题。
        description:
          type: string
          description: Section 描述；未设置时为空串。
        breadcrumb:
          type: array
          items:
            type: string
          description: 仪表盘、tab 与 section 标题。
        panels:
          type: array
          items:
            $ref: '#/components/schemas/DashboardOutlinePanel'
          description: 该 section 内的面板。
      required:
        - id
        - title
        - breadcrumb
        - panels
    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
    DashboardOutlineVizConfig:
      type: object
      description: 大纲面板的可视化类型。
      properties:
        kind:
          type: string
          enum:
            - time_series
            - table
            - stat
            - bar
            - gauge
            - logs
            - text
          description: >-
            可视化类型：`time_series` = 时序图；`table` = 表格；`stat` = 单值；`bar` =
            柱状图；`gauge` = 仪表盘；`logs` = 日志流；`text` = Markdown 文本。
      required:
        - kind
    ErrorCode:
      type: string
      description: >-
        Flashduty 错误码枚举。每个失败响应的 `error.code` 都是下列稳定值之一，HTTP 状态码仅作参考。


        | 错误码 | HTTP | 含义 |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        | `ServiceUnavailable` | 503 | 后端依赖不可用，请稍后重试。 |
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - RequestLocked
        - EntityTooLarge
        - RequestTooFrequently
        - RequestVerifyRequired
        - DangerousOperation
        - InternalError
        - ServiceUnavailable
      x-enumDescriptions:
        OK: 保留值，正常错误响应不会返回。
        InvalidParameter: 必填参数缺失或未通过校验。
        BadRequest: 通用的 400 错误，通常是请求本身不合法。
        InvalidContentType: 请求头 `Content-Type` 不是 `application/json`。
        ResourceNotFound: 目标资源不存在。注意 HTTP 状态码是 400 而非 404（历史设计）。
        NoLicense: 功能需要有效授权，但未找到可用的 license。
        ReferenceExist: 该资源仍被其他实体引用，无法删除。
        Unauthorized: '`app_key` 缺失、无效或已过期。'
        BalanceNotEnough: 账户余额不足，无法执行需要计费的操作。
        AccessDenied: 身份认证通过，但 RBAC 权限不足以执行该操作。
        RouteNotFound: 请求的 URL 路径不是已知路由。
        MethodNotAllowed: 当前路径不接受所使用的 HTTP 方法。
        UndonedOrderExist: 账户存在未完成的订单，请稍后重试。
        RequestLocked: 因连续失败被临时锁定。
        EntityTooLarge: 请求体超过允许的最大长度。
        RequestTooFrequently: 命中限流（全局、账户级或集成级）。
        RequestVerifyRequired: 操作需要二次验证码，但未提供。
        DangerousOperation: 危险操作，需要进行 MFA 验证。
        InternalError: 服务端未预期错误。反馈问题请附上 `request_id`。
        ServiceUnavailable: 后端依赖不可用，请稍后重试。
      example: InvalidParameter
  responses:
    BadRequest:
      description: 请求非法 — 通常是参数缺失或格式不正确。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InvalidParameter
                  message: The specified parameter is not valid.
    Unauthorized:
      description: app_key 缺失或无效。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingAppKey:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: Unauthorized
                  message: You are unauthorized.
    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.