{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://api-evangelist.github.io/grafana/json-schema/dashboard.json", "title": "Grafana Dashboard", "description": "Schema for a Grafana dashboard model, defining the structure of dashboard JSON that can be saved and loaded via the Grafana HTTP API.", "type": "object", "properties": { "id": { "type": ["integer", "null"], "description": "Unique numeric identifier. Null when creating a new dashboard." }, "uid": { "type": "string", "description": "Unique dashboard identifier that can be generated by the client. Used for stable references across instances.", "maxLength": 40 }, "title": { "type": "string", "description": "Title of the dashboard" }, "description": { "type": "string", "description": "Description of the dashboard" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags associated with the dashboard" }, "timezone": { "type": "string", "description": "Timezone for the dashboard. Empty string means browser default.", "enum": ["", "browser", "utc"], "default": "browser" }, "schemaVersion": { "type": "integer", "description": "Version of the dashboard schema. Auto-managed by Grafana.", "minimum": 0 }, "version": { "type": "integer", "description": "Dashboard version, incremented on each save. Used for optimistic locking.", "minimum": 0 }, "refresh": { "type": "string", "description": "Auto-refresh interval, e.g. 5s, 1m, 5m, 15m, 30m, 1h, 2h, 1d" }, "editable": { "type": "boolean", "default": true, "description": "Whether the dashboard is editable or read-only" }, "fiscalYearStartMonth": { "type": "integer", "minimum": 0, "maximum": 11, "default": 0, "description": "Month (0-11) for the start of the fiscal year" }, "graphTooltip": { "type": "integer", "enum": [0, 1, 2], "default": 0, "description": "0: default, 1: shared crosshair, 2: shared tooltip" }, "liveNow": { "type": "boolean", "description": "Whether to continuously re-draw panels with streaming data" }, "time": { "type": "object", "description": "Default time range for the dashboard", "properties": { "from": { "type": "string", "description": "Start of time range, e.g. now-6h, now-7d, 2023-01-01T00:00:00Z" }, "to": { "type": "string", "description": "End of time range, e.g. now" } }, "required": ["from", "to"] }, "timepicker": { "type": "object", "description": "Time picker configuration", "properties": { "collapse": { "type": "boolean" }, "enable": { "type": "boolean" }, "hidden": { "type": "boolean" }, "refresh_intervals": { "type": "array", "items": { "type": "string" }, "description": "Available auto-refresh intervals" }, "time_options": { "type": "array", "items": { "type": "string" }, "description": "Available time range quick picks" } } }, "panels": { "type": "array", "description": "List of panels in the dashboard", "items": { "$ref": "panel.json" } }, "templating": { "type": "object", "description": "Template variables configuration", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": ["query", "custom", "constant", "datasource", "interval", "textbox", "adhoc"] }, "label": { "type": "string" }, "datasource": { "type": ["object", "string", "null"] }, "query": {}, "current": { "type": "object" }, "options": { "type": "array", "items": { "type": "object" } }, "hide": { "type": "integer", "enum": [0, 1, 2], "description": "0: show label and value, 1: show value only, 2: hide completely" }, "multi": { "type": "boolean" }, "includeAll": { "type": "boolean" }, "allValue": { "type": ["string", "null"] }, "refresh": { "type": "integer", "enum": [0, 1, 2], "description": "0: never, 1: on dashboard load, 2: on time range change" }, "sort": { "type": "integer" }, "regex": { "type": "string" }, "skipUrlSync": { "type": "boolean" } }, "required": ["name", "type"] } } } }, "annotations": { "type": "object", "description": "Dashboard annotations configuration", "properties": { "list": { "type": "array", "items": { "type": "object", "properties": { "builtIn": { "type": "integer" }, "datasource": { "type": "object" }, "enable": { "type": "boolean" }, "hide": { "type": "boolean" }, "iconColor": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" } } } } } }, "links": { "type": "array", "description": "Dashboard-level links", "items": { "type": "object", "properties": { "title": { "type": "string" }, "type": { "type": "string", "enum": ["dashboards", "link"] }, "url": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "targetBlank": { "type": "boolean" }, "asDropdown": { "type": "boolean" }, "icon": { "type": "string" }, "includeVars": { "type": "boolean" }, "keepTime": { "type": "boolean" }, "tooltip": { "type": "string" } } } } }, "required": ["title"] }