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

# Run dashboard panel

> Execute one panel of a stored dashboard and return the datasource results.



## OpenAPI

````yaml /api-reference/monitors.openapi.en.json post /monit/dashboard/panel/run
openapi: 3.1.0
info:
  title: Flashduty Open API
  description: >-
    Public HTTP API for the Flashduty incident management platform — incidents,
    notification templates, channels, schedules, monitors, RUM, and platform
    administration. Every operation is authenticated with an `app_key` query
    parameter issued from the Flashduty console under Account → APP Keys.
    Responses follow a uniform envelope: `{ request_id, data }` on success, `{
    request_id, error }` on failure.
  version: 1.0.0
servers:
  - url: https://api.flashcat.cloud
    description: Flashduty Open API
security:
  - AppKeyAuth: []
tags:
  - name: Monitors/Alert rules
    description: >-
      Create, manage, and export monitor alert rules. Query rule counters and
      audit history.
  - name: Monitors/Data sources
    description: Manage monitoring data sources used by alert rules to query metrics.
  - name: Monitors/Diagnostics
    description: >-
      Diagnostic and query endpoints used by Flashduty AI SRE — ad-hoc data
      source queries, log/metric diagnostics, and target-side tool invocation.
  - name: Monitors/Monitor utilities
    description: Monitors service activation and data preview utilities.
  - name: Monitors/Dashboards
    description: >-
      Create, search, version and run Monitors dashboards, and resolve their
      variables and queries.
  - name: Monitors/Rule folders
    description: >-
      List the monitor folder tree that dashboards and alert rules are organised
      in.
paths:
  /monit/dashboard/panel/run:
    post:
      tags:
        - Monitors/Dashboards
      summary: Run dashboard panel
      description: >-
        Execute one panel of a stored dashboard and return the datasource
        results.
      operationId: monit-dashboard-panel-read-run
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DashboardPanelRunRequest'
            example:
              dashboard_id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2101
              panel_id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2404
              revision: 7
              time:
                from_ms: 1791100800000
                to_ms: 1791104400000
              variables:
                env:
                  kind: values
                  values:
                    - prod
              max_data_points: 100
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/DashboardPanelRunResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  dashboard_id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2101
                  panel_id: 01990d7a-9c5b-7ab0-9c18-33e38f6f2404
                  revision: 7
                  run_state: success
                  time:
                    from_ms: 1791100800000
                    to_ms: 1791104400000
                  variables:
                    env:
                      kind: values
                      values:
                        - prod
                  refs:
                    - ref_id: A
                      state: success
                      child_request_id: 01HK8XQH7B4N0PQR2S6TVW9X3M
                      execution:
                        status: success
                        frames:
                          - schema:
                              fields:
                                - name: time
                                  type: time
                                - name: value
                                  type: number
                            data:
                              values:
                                - - 1791100800000
                                  - 812.4
                                - - 1791100860000
                                  - 846.1
                  display:
                    kind: time_series
                    options: {}
                    unit: count_per_second
                    decimals: 2
                    threshold:
                      mode: higher_is_worse
                      warning: 1000
                      critical: 2000
                  budget:
                    max_concurrency: 6
                    execution_count: 1
        '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:
    DashboardPanelRunRequest:
      type: object
      description: >-
        Execute one panel against the stored dashboard. Omit `revision` to run
        the current revision; send it to have stale responses rejected.
      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 of the dashboard.
        panel_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: Panel to execute.
        revision:
          type: integer
          format: uint64
          minimum: 1
          description: Revision guard; when set it must equal the current revision.
        time:
          $ref: '#/components/schemas/DashboardAbsoluteTimeRange'
        variables:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DashboardSelection'
          description: Selections keyed by variable name, at most 20 entries.
        max_data_points:
          type:
            - integer
            - 'null'
          minimum: 2
          maximum: 5000
          description: >-
            Downsampling target, 2–5000 points; omit or send null for the server
            default of 100.
      required:
        - dashboard_id
        - panel_id
        - time
        - variables
    SuccessEnvelope:
      type: object
      description: >-
        Success response envelope. On every 2xx response, `request_id`
        identifies the call (also mirrored in the `Flashcat-Request-Id` header)
        and `data` holds the endpoint-specific payload. Failure responses use a
        different shape — see `ErrorResponse`.
      properties:
        request_id:
          type: string
          description: >-
            Unique ID for this request. Mirrored in the Flashcat-Request-Id
            response header. Include it when reporting issues.
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        data:
          description: Endpoint-specific payload. See each operation's 200 response schema.
      required:
        - request_id
        - data
    DashboardPanelRunResponse:
      type: object
      description: >-
        Panel execution result. `run_state` aggregates the per-query states:
        `success` when all succeeded, `partial` when some did, otherwise
        `incompatible`, `cancelled` or `error`. The total response is capped at
        8 MiB.
      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: Dashboard ID.
        panel_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: Panel ID.
        revision:
          type: integer
          format: uint64
          minimum: 1
          description: Revision the run executed against.
        run_state:
          type: string
          enum:
            - success
            - partial
            - incompatible
            - cancelled
            - error
          description: >-
            Aggregate state of the run: `success` = all queries succeeded;
            `partial` = some succeeded; `incompatible` = at least one query is
            incompatible with its datasource; `cancelled` = the run was
            cancelled; `error` = all queries failed.
        time:
          $ref: '#/components/schemas/DashboardAbsoluteTimeRange'
        variables:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DashboardSelection'
          description: Selections that resolved successfully.
        refs:
          type: array
          items:
            $ref: '#/components/schemas/DashboardPanelRunRef'
          description: One entry per query in the panel.
        display:
          $ref: '#/components/schemas/DashboardVizConfig'
        budget:
          $ref: '#/components/schemas/DashboardPanelRunBudget'
      required:
        - dashboard_id
        - panel_id
        - revision
        - run_state
        - time
        - variables
        - refs
        - display
        - budget
    DashboardAbsoluteTimeRange:
      type: object
      description: >-
        Absolute evaluation window. Both bounds are Unix timestamps in
        milliseconds, `from_ms` must be less than `to_ms`, and neither may
        exceed the JavaScript safe integer limit.
      properties:
        from_ms:
          type: integer
          format: int64
          minimum: 0
          description: Unix timestamp in milliseconds.
        to_ms:
          type: integer
          format: int64
          minimum: 1
          description: Unix timestamp in milliseconds.
      required:
        - from_ms
        - to_ms
    DashboardSelection:
      type: object
      description: >-
        A concrete selection of variable values. An empty `values` array is
        valid wire input and means unresolved — the server never substitutes a
        default for it.
      properties:
        kind:
          type: string
          enum:
            - values
            - all
          description: >-
            `values` selects the listed entries, `all` selects everything (only
            allowed when `include_all` is true).
        values:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 1024
          maxItems: 1000
          description: >-
            Selected values, unique and never `$__all`. Must be empty when
            `kind` is `all`.
      required:
        - kind
    DashboardPanelRunRef:
      type: object
      description: >-
        Result of one query inside a panel run. The raw execution payload
        differs per datasource type and is passed through unmodified, so it is
        not schema-constrained here.
      properties:
        ref_id:
          type: string
          pattern: ^[A-Z]$
          description: Panel-local query reference.
        state:
          type: string
          enum:
            - success
            - error
            - incompatible
          description: >-
            Per-query execution state: `success` = the query executed; `error` =
            the query failed; `incompatible` = the datasource accepted the call
            but the query mode or field selection does not fit the datasource
            type.
        child_request_id:
          type: string
          description: >-
            Request ID of the underlying datasource execution; use it when
            tracing a single query.
        execution:
          type: object
          additionalProperties: true
          description: Datasource-specific execution payload, passed through unmodified.
        error:
          $ref: '#/components/schemas/DashboardRuntimeError'
      required:
        - ref_id
        - state
    DashboardVizConfig:
      description: >-
        Visualization configuration. `kind` selects the arm and therefore which
        sibling config object is required; `time_series` also carries the shared
        numeric options.
      oneOf:
        - $ref: '#/components/schemas/DashboardTimeSeriesViz'
        - $ref: '#/components/schemas/DashboardTableViz'
        - $ref: '#/components/schemas/DashboardStatViz'
        - $ref: '#/components/schemas/DashboardBarViz'
        - $ref: '#/components/schemas/DashboardGaugeViz'
        - $ref: '#/components/schemas/DashboardLogsViz'
        - $ref: '#/components/schemas/DashboardTextViz'
      discriminator:
        propertyName: kind
        mapping:
          time_series: '#/components/schemas/DashboardTimeSeriesViz'
          table: '#/components/schemas/DashboardTableViz'
          stat: '#/components/schemas/DashboardStatViz'
          bar: '#/components/schemas/DashboardBarViz'
          gauge: '#/components/schemas/DashboardGaugeViz'
          logs: '#/components/schemas/DashboardLogsViz'
          text: '#/components/schemas/DashboardTextViz'
    DashboardPanelRunBudget:
      type: object
      description: Execution accounting for a panel run.
      properties:
        max_concurrency:
          type: integer
          minimum: 1
          description: Concurrency cap applied to the panel's queries.
        execution_count:
          type: integer
          minimum: 0
          description: Number of queries launched.
      required:
        - max_concurrency
        - execution_count
    ErrorResponse:
      type: object
      description: Response envelope for errors. `error` is required; `data` is absent.
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          description: >-
            Unique trace ID of this request; include it when reporting issues so
            logs can be located.
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    DashboardRuntimeError:
      type: object
      description: >-
        Per-variable or per-query failure. A failed arm does not fail the whole
        call.
      properties:
        reason:
          type: string
          description: >-
            Machine-readable failure reason. Observed values include
            `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` and `internal`.
        message:
          type: string
          description: Human-readable detail for the failure.
      required:
        - reason
        - message
    DashboardTimeSeriesViz:
      type: object
      description: Time-series visualization.
      properties:
        kind:
          type: string
          enum:
            - time_series
          description: Visualization kind discriminator; always `time_series`.
        options:
          type: object
          additionalProperties: true
          description: >-
            Open options object for the chosen visualization kind; the only part
            of the definition that round-trips losslessly. Missing or null
            normalizes to `{}`.
        unit:
          type: string
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          description: >-
            Display unit for the panel's numeric values: `unitless` = raw
            number; `ratio` = fraction of 1; `percent` = percentage;
            `milliseconds` = duration in milliseconds; `seconds` = duration in
            seconds; `bytes` = size in bytes; `bits` = size in bits;
            `count_per_second` = per-second count; `bytes_per_second` = bytes
            per second; `bits_per_second` = bits per second.
        decimals:
          type:
            - integer
            - 'null'
          minimum: 0
          description: Fixed decimal places; omit or send null to let the renderer decide.
        threshold:
          $ref: '#/components/schemas/DashboardThreshold'
      required:
        - kind
        - options
    DashboardTableViz:
      type: object
      description: Table visualization.
      properties:
        kind:
          type: string
          enum:
            - table
          description: Visualization kind discriminator; always `table`.
        options:
          type: object
          additionalProperties: true
          description: >-
            Open options object for the chosen visualization kind; the only part
            of the definition that round-trips losslessly. Missing or null
            normalizes to `{}`.
        column_options:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DashboardColumnOption'
          description: >-
            Per-column display overrides keyed by field name, at most 100
            entries.
        sort:
          type: array
          items:
            $ref: '#/components/schemas/DashboardFieldSort'
          maxItems: 2
          description: Initial sort keys; fields must be unique.
        link_columns:
          type: array
          items:
            $ref: '#/components/schemas/DashboardDataLink'
          maxItems: 5
          description: >-
            Drill-down links rendered as table columns. Together with per-column
            links a table allows at most 5.
      required:
        - kind
        - options
    DashboardStatViz:
      type: object
      description: Single-value (stat) visualization.
      properties:
        kind:
          type: string
          enum:
            - stat
          description: Visualization kind discriminator; always `stat`.
        options:
          type: object
          additionalProperties: true
          description: >-
            Open options object for the chosen visualization kind; the only part
            of the definition that round-trips losslessly. Missing or null
            normalizes to `{}`.
        unit:
          type: string
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          description: >-
            Display unit for the panel's numeric values: `unitless` = raw
            number; `ratio` = fraction of 1; `percent` = percentage;
            `milliseconds` = duration in milliseconds; `seconds` = duration in
            seconds; `bytes` = size in bytes; `bits` = size in bits;
            `count_per_second` = per-second count; `bytes_per_second` = bytes
            per second; `bits_per_second` = bits per second.
        decimals:
          type:
            - integer
            - 'null'
          minimum: 0
          description: Fixed decimal places; omit or send null to let the renderer decide.
        threshold:
          $ref: '#/components/schemas/DashboardThreshold'
        value_fields:
          type: array
          items:
            type: string
          description: Fields reduced to the displayed values.
        reducer:
          type: string
          enum:
            - last_non_null
            - min
            - max
            - mean
            - sum
          description: >-
            Reduction applied across the returned rows: `last_non_null` = most
            recent non-null value; `min` = minimum; `max` = maximum; `mean` =
            average; `sum` = sum.
      required:
        - kind
        - options
        - value_fields
        - reducer
    DashboardBarViz:
      type: object
      description: Bar-chart visualization.
      properties:
        kind:
          type: string
          enum:
            - bar
          description: Visualization kind discriminator; always `bar`.
        options:
          type: object
          additionalProperties: true
          description: >-
            Open options object for the chosen visualization kind; the only part
            of the definition that round-trips losslessly. Missing or null
            normalizes to `{}`.
        unit:
          type: string
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          description: >-
            Display unit for the panel's numeric values: `unitless` = raw
            number; `ratio` = fraction of 1; `percent` = percentage;
            `milliseconds` = duration in milliseconds; `seconds` = duration in
            seconds; `bytes` = size in bytes; `bits` = size in bits;
            `count_per_second` = per-second count; `bytes_per_second` = bytes
            per second; `bits_per_second` = bits per second.
        decimals:
          type:
            - integer
            - 'null'
          minimum: 0
          description: Fixed decimal places; omit or send null to let the renderer decide.
        threshold:
          $ref: '#/components/schemas/DashboardThreshold'
        category_field:
          type: string
          description: Field supplying the category axis.
        value_fields:
          type: array
          items:
            type: string
          description: Fields supplying the bar values.
        data_link:
          $ref: '#/components/schemas/DashboardDataLink'
      required:
        - kind
        - options
        - category_field
        - value_fields
    DashboardGaugeViz:
      type: object
      description: Gauge visualization.
      properties:
        kind:
          type: string
          enum:
            - gauge
          description: Visualization kind discriminator; always `gauge`.
        options:
          type: object
          additionalProperties: true
          description: >-
            Open options object for the chosen visualization kind; the only part
            of the definition that round-trips losslessly. Missing or null
            normalizes to `{}`.
        unit:
          type: string
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          description: >-
            Display unit for the panel's numeric values: `unitless` = raw
            number; `ratio` = fraction of 1; `percent` = percentage;
            `milliseconds` = duration in milliseconds; `seconds` = duration in
            seconds; `bytes` = size in bytes; `bits` = size in bits;
            `count_per_second` = per-second count; `bytes_per_second` = bytes
            per second; `bits_per_second` = bits per second.
        decimals:
          type:
            - integer
            - 'null'
          minimum: 0
          description: Fixed decimal places; omit or send null to let the renderer decide.
        threshold:
          $ref: '#/components/schemas/DashboardThreshold'
        value_fields:
          type: array
          items:
            type: string
          description: Fields reduced to the gauge value.
        reducer:
          type: string
          enum:
            - last_non_null
            - min
            - max
            - mean
            - sum
          description: >-
            Reduction applied across the returned rows: `last_non_null` = most
            recent non-null value; `min` = minimum; `max` = maximum; `mean` =
            average; `sum` = sum.
        min:
          type:
            - number
            - 'null'
          description: Scale lower bound.
        max:
          type:
            - number
            - 'null'
          description: Scale upper bound; must exceed `min` when both are set.
      required:
        - kind
        - options
        - value_fields
        - reducer
    DashboardLogsViz:
      type: object
      description: Log-stream visualization.
      properties:
        kind:
          type: string
          enum:
            - logs
          description: Visualization kind discriminator; always `logs`.
        options:
          type: object
          additionalProperties: true
          description: >-
            Open options object for the chosen visualization kind; the only part
            of the definition that round-trips losslessly. Missing or null
            normalizes to `{}`.
        display_fields:
          type: array
          items:
            type: string
          description: Log fields rendered for each row.
      required:
        - kind
        - options
    DashboardTextViz:
      type: object
      description: Markdown text panel.
      properties:
        kind:
          type: string
          enum:
            - text
          description: Visualization kind discriminator; always `text`.
        options:
          type: object
          additionalProperties: true
          description: >-
            Open options object for the chosen visualization kind; the only part
            of the definition that round-trips losslessly. Missing or null
            normalizes to `{}`.
        markdown:
          type: string
          maxLength: 65536
          description: >-
            Markdown body, at most 64 KiB. Only a restricted node set (headings,
            lists, tables, links, code) survives validation.
      required:
        - kind
        - options
        - markdown
    DutyError:
      type: object
      description: >-
        Error payload inside the response envelope. Present only on non-2xx
        responses.
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            Human-readable error message, localized by the caller's
            Accept-Language. May contain field names, IDs, or other context from
            the failing request.
          example: The specified parameter template_id is not valid.
        reason:
          description: >-
            Optional machine-readable rejection reason, including datasource
            tool failures. Inspect alongside HTTP status and code.
          type: string
          x-flashduty-preserve-absence: true
      required:
        - code
        - message
    DashboardThreshold:
      type: object
      description: >-
        Colour threshold for a numeric value. At least one of
        `warning`/`critical` is required, and with both set the pair must be
        ordered according to `mode`.
      properties:
        mode:
          type: string
          enum:
            - higher_is_worse
            - lower_is_worse
          description: >-
            Direction of the comparison: `higher_is_worse` = values at or above
            the bound breach it; `lower_is_worse` = values at or below the bound
            breach it.
        warning:
          type:
            - number
            - 'null'
          description: Warning bound; must be finite.
        critical:
          type:
            - number
            - 'null'
          description: Critical bound; must be finite.
      required:
        - mode
    DashboardColumnOption:
      type: object
      description: Per-column display override for a table.
      properties:
        display_name:
          type: string
          description: Header text replacing the raw field name.
        hidden:
          type:
            - boolean
            - 'null'
          description: Hide the column; omit to keep it visible.
        width_px:
          type:
            - integer
            - 'null'
          minimum: 80
          maximum: 1200
          description: Column width in pixels, 80–1200.
        unit:
          type: string
          enum:
            - unitless
            - ratio
            - percent
            - milliseconds
            - seconds
            - bytes
            - bits
            - count_per_second
            - bytes_per_second
            - bits_per_second
          description: >-
            Unit override for the column: `unitless` = raw number; `ratio` =
            fraction of 1; `percent` = percentage; `milliseconds` = duration in
            milliseconds; `seconds` = duration in seconds; `bytes` = size in
            bytes; `bits` = size in bits; `count_per_second` = per-second count;
            `bytes_per_second` = bytes per second; `bits_per_second` = bits per
            second.
        threshold:
          $ref: '#/components/schemas/DashboardThreshold'
        threshold_display:
          type: string
          enum:
            - text
            - background
          description: >-
            How the threshold is painted: `text` = colours the cell text;
            `background` = colours the cell background.
        data_link:
          $ref: '#/components/schemas/DashboardDataLink'
    DashboardFieldSort:
      type: object
      description: A single sort key.
      properties:
        field:
          type: string
          minLength: 1
          description: Field name to sort by.
        direction:
          type: string
          enum:
            - asc
            - desc
          description: 'Sort direction: `asc` = ascending; `desc` = descending.'
      required:
        - field
        - direction
    DashboardDataLink:
      type: object
      description: >-
        Drill-down link from a table column or bar panel into another dashboard.
        The target dashboard must exist and the mapping sources must match the
        source panel's shape.
      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: Target dashboard ID.
        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: Optional tab, section or panel ID to focus in the target dashboard.
        pass_time:
          type: boolean
          description: When true the current time range is forwarded to the target.
        variable_mappings:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DashboardLinkMapping'
          description: >-
            Maps target variable names to a source value such as a column or a
            source variable.
      required:
        - dashboard_id
        - pass_time
        - variable_mappings
    ErrorCode:
      type: string
      description: >-
        Flashduty error code enum. Every failed API response sets `error.code`
        to one of these stable wire strings. HTTP status is informational — the
        authoritative signal is the enum value.


        | Code | HTTP | Meaning |

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

        | `OK` | 200 | Reserved — not returned on real errors. |

        | `InvalidParameter` | 400 | A required parameter is missing or failed
        validation. |

        | `BadRequest` | 400 | Generic 400 used when no more specific code fits.
        |

        | `InvalidContentType` | 400 | The `Content-Type` header is not
        `application/json`. |

        | `ResourceNotFound` | 400 | The referenced resource does not exist.
        Note: returned as HTTP 400, not 404 (historical choice). |

        | `NoLicense` | 400 | The feature is license-gated and no active license
        was found. |

        | `ReferenceExist` | 400 | Deletion blocked — other entities still
        reference this resource. |

        | `Unauthorized` | 401 | `app_key` is missing, invalid, or expired. |

        | `BalanceNotEnough` | 402 | Billing-gated operation with insufficient
        account balance. |

        | `AccessDenied` | 403 | Authenticated but lacking the permission
        required for this operation. |

        | `RouteNotFound` | 404 | The request URL path is not a known route. |

        | `MethodNotAllowed` | 405 | The HTTP method is not allowed on this
        otherwise-known path. |

        | `UndonedOrderExist` | 409 | An outstanding billing order blocks this
        new one. Wait and retry. |

        | `RequestLocked` | 423 | Operation temporarily locked due to repeated
        failures. |

        | `EntityTooLarge` | 413 | Request body exceeds the configured max size.
        |

        | `RequestTooFrequently` | 429 | Rate limit hit — API-global,
        per-account, or per-integration. |

        | `RequestVerifyRequired` | 428 | Second-factor verification required
        but not supplied. |

        | `DangerousOperation` | 428 | High-risk operation requires MFA
        verification. |

        | `InternalError` | 500 | Unhandled server-side error. Include
        `request_id` in the bug report. |

        | `ServiceUnavailable` | 503 | A backend dependency is unavailable. Try
        again later. |
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - RequestLocked
        - EntityTooLarge
        - RequestTooFrequently
        - RequestVerifyRequired
        - DangerousOperation
        - InternalError
        - ServiceUnavailable
      x-enumDescriptions:
        OK: Reserved — not returned on real errors.
        InvalidParameter: A required parameter is missing or failed validation.
        BadRequest: Generic 400 used when no more specific code fits.
        InvalidContentType: The `Content-Type` header is not `application/json`.
        ResourceNotFound: >-
          The referenced resource does not exist. Note: returned as HTTP 400,
          not 404 (historical choice).
        NoLicense: The feature is license-gated and no active license was found.
        ReferenceExist: Deletion blocked — other entities still reference this resource.
        Unauthorized: '`app_key` is missing, invalid, or expired.'
        BalanceNotEnough: Billing-gated operation with insufficient account balance.
        AccessDenied: Authenticated but lacking the permission required for this operation.
        RouteNotFound: The request URL path is not a known route.
        MethodNotAllowed: The HTTP method is not allowed on this otherwise-known path.
        UndonedOrderExist: An outstanding billing order blocks this new one. Wait and retry.
        RequestLocked: Operation temporarily locked due to repeated failures.
        EntityTooLarge: Request body exceeds the configured max size.
        RequestTooFrequently: Rate limit hit — API-global, per-account, or per-integration.
        RequestVerifyRequired: Second-factor verification required but not supplied.
        DangerousOperation: High-risk operation requires MFA verification.
        InternalError: Unhandled server-side error. Include `request_id` in the bug report.
        ServiceUnavailable: A backend dependency is unavailable. Try again later.
      example: InvalidParameter
    DashboardLinkMapping:
      type: object
      description: One entry of a drill-down variable mapping.
      properties:
        source:
          type: string
          enum:
            - variable
            - row_column
            - category
            - series
            - value
          description: >-
            Where the value comes from: `variable` = a dashboard variable;
            `row_column` = a table column (requires `column`); `category` = the
            bar category; `series` = the series name; `value` = the value
            itself. `category`, `series` and `value` are only valid for bar
            panels.
        column:
          type: string
          description: Source column name; required when `source` is `row_column`.
        name:
          type: string
          description: >-
            Source dashboard variable name; required when `source` is
            `variable`.
      required:
        - source
  responses:
    BadRequest:
      description: Invalid request — usually a missing or malformed parameter.
      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: Missing or invalid 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: The app_key is valid but lacks permission for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            noEditPermission:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: AccessDenied
                  message: Access Denied.
    NotFound:
      description: >-
        The referenced resource does not exist or has been deleted. Note:
        Flashduty historically returns HTTP 400 with code `ResourceNotFound` for
        missing domain entities; a true 404 is reserved for unknown routes.
      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: >-
        Rate limit hit. Either the global API limit, a per-account limit, or a
        per-integration limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: RequestTooFrequently
                  message: Request too frequently.
    ServerError:
      description: Unexpected server-side error. Include the request_id when reporting.
      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: >-
        App key issued from the Flashduty console under Account → APP Keys.
        Required on every public API call. Keep it secret — it grants the same
        access as the owning account.

````

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