Skip to main content
Monitoring & Collection/Grafana Dashboards
POSTGrafanaSince 1.0SynchronousAuth Required

ValidateDashboardPanels

Validate that a set of panels fits within canvas bounds and has no overlaps

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • panelsListRequired

    Panels for this resource

    Example: (nested array)

    • panelIdString

      Unique identifier of the panel within the dashboard

      Example: panel-cpu-001

    • xInteger

      Horizontal grid position of the panel

      Example: 20

    • yInteger

      Vertical grid position of the panel

      Example: 20

    • wInteger

      Width of the panel in grid units

      Example: 12

    • hInteger

      Height of the panel in grid units

      Example: 8

  • maxPanelOverrideIntegerRequired

    Override max panel count for this validation request

    Example: 20

Responses

200 OK

On success, this API returns the following response structure.

  • validBoolean

    Whether the panel layout passed validation

    Example: true

  • errorCodeString

    Machine-readable error code if validation failed

    Example: INVALID_CONFIG

  • conflictsList

    Conflicts for this resource

    Example: (nested array)

    • panelAIdString

      ID of the first panel in the overlap

      Example: panel-cpu-001

    • panelBIdString

      ID of the second panel in the overlap

      Example: panel-mem-002

    • overlapXInteger

      X coordinate of the overlap region

      Example: 6

    • overlapYInteger

      Y coordinate of the overlap region

      Example: 20

    • overlapWInteger

      Width of the overlap region

      Example: 2

    • overlapHInteger

      Height of the overlap region

      Example: 4

  • boundErrorsList

    Bound errors

    Example: (nested array)

    • panelIdString

      ID of the panel that exceeds canvas bounds

      Example: panel-cpu-001

    • fieldString

      Name of the field that caused the bound error (e.g. x, w, h)

      Example: w

    • valueInteger

      Value that exceeded the bound

      Example: 25

    • messageString

      Human-readable bound error description

      Example: panel width 25 exceeds canvas width 24

  • panelCountInteger

    Number of panels in the layout

    Example: 6

  • maxPanelsInteger

    Maximum allowed panels for this dashboard

    Example: 20

  • suggestionString

    Suggestion for resolving validation issues

    Example: consider increasing the threshold

Endpoint

POST/api/v1/monitoring/dashboards/validate

/api/v1/monitoring/dashboards/validate

Operation ID

ValidateDashboardPanels

Permalink

Request Example

curl -X POST '{host}/api/v1/monitoring/dashboards/validate' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"panels":"(nested array)","maxPanelOverride":20}'

Response Example

200
{
  "valid": true,
  "errorCode": "INVALID_CONFIG",
  "conflicts": [
    {}
  ],
  "boundErrors": [
    {}
  ],
  "panelCount": 6,
  "maxPanels": 20,
  "suggestion": "consider increasing the threshold"
}

Change History

This API has no change history records yet.

View all change history