A Dynatrace dashboard is stored as a JSON document. Understanding the structure helps you create and modify dashboards using the API or by editing JSON directly in
Dashboards.
A dashboard document consists of four required properties—version, variables, tiles, and layouts—plus optional properties such as settings and annotations. Tiles define the content displayed on the dashboard, and layouts control their position on the grid.
{"version": 21,"variables": [],"tiles": {},"layouts": {}}
Optional properties: settings, annotations.
Tile IDs in tiles must match IDs in layouts. IDs are strings (typically numeric strings such as "1", "2").
Tiles are stored in content.tiles as an object whose keys are tile IDs. There are four tile types.
A markdown tile displays static text content formatted with Markdown.
{"type": "markdown","content": "# Section Header\n\nSome text here."}
A data tile runs a DQL query and displays the results as a visualization.
{"type": "data","title": "Tile Name","query": "timeseries avg(dt.host.cpu.usage), by:{host.name}","visualization": "lineChart","visualizationSettings": {},"querySettings": {}}
| Property | Required | Description |
|---|---|---|
| Yes | Displayed at the top of the tile. |
| Yes | DQL query. |
| Yes | Visualization type. See Visualization types. |
| Yes | Visualization-specific settings object. Can be empty. |
| Yes | Query-specific settings object. Can be empty. |
| No | Additional tile description. |
| No | Tile-specific timeframe override. Must be an object, not a string. |
| No | Tile-specific segment filter. |
A code tile executes JavaScript and optionally displays results as a visualization.
{"type": "code","title": "Custom","input": "// JavaScript code here","visualization": "lineChart","visualizationSettings": {}}
An SLO tile displays a Service-Level Objective by its ID.
{"type": "slo","title": "SLO Name","input": "slo-id","visualizationSettings": {}}
The visualization property of a data tile determines how query results are rendered. Each visualization requires specific field types in the query result. If the query produces the wrong types, the tile renders blank or shows an error.
Field types: timestamp, timeframe, long, double, duration, string, numericArray
Legend: R = required, O = optional, C = conditional
lineChart, areaChart, barChart display metric data over time.
| Slot | Accepted types | Count | Req |
|---|---|---|---|
Time | timestamp, timeframe | 1 | R |
Interval | duration | 1 | C—required when Values is numericArray |
Values | long, double, duration, numericArray | 1+ | R |
Names | any | 1+ | O |
When using timeseries or makeTimeseries, values are numericArray and an interval field must be present in the query result.
bandChart has the same requirements plus two additional required numericArray slots for band min and band max values.
categoricalBarChart, pieChart, donutChart show values grouped by categories. Typical query pattern: summarize <aggregation>, by:{category}.
| Slot | Accepted types | Count | Req |
|---|---|---|---|
Values | long, double, duration | 1+ | R |
Categories | any | 1+ | R |
singleValue displays a single metric value.
| Slot | Accepted types | Count | Req |
|---|---|---|---|
Single value | any | 1 | R |
Sparkline | numericArray | 1 | O |
meterBar and gauge display a numeric value on a scale.
| Slot | Accepted types | Count | Req |
|---|---|---|---|
Meter/Gauge value | long, double, duration | 1 | R |
table, raw, and recordList accept any data shape with no field type requirements.
davis, histogram, honeycomb, choropleth, dotMap, connectionMap, bubbleMap, heatmap, scatterplot, and treemap are also available, each with their own slot requirements.
Tile positions are stored in content.layouts as an object whose keys match the tile IDs in content.tiles. Every tile in tiles must have a matching entry in layouts.
"layouts": {"1": { "x": 0, "y": 0, "w": 24, "h": 1 },"2": { "x": 0, "y": 1, "w": 12, "h": 8 },"3": { "x": 12, "y": 1, "w": 12, "h": 8 },"4": { "x": 0, "y": 9, "w": 24, "h": 8 }}
| Property | Description |
|---|---|
| Horizontal position (column), zero-indexed. |
| Vertical position (row), zero-indexed. |
| Width in grid units. |
| Height in grid units. |
The grid is 24 columns wide. Common widths:
24—full width12—half width6—quarter widthCommon heights:
1—header or label row6 to 8—standard chart12 to 16—detailed viewTiles with x + w > 24 wrap to the next row.
Variables provide dynamic filtering across tiles. Defined in content.variables as an array, they are referenced in DQL queries using $key.
All variable types share these properties:
| Property | Type | Description |
|---|---|---|
| string | Identifier used as |
| string |
|
| boolean | Show the variable selector in the dashboard UI. |
| boolean | Allow users to change the selected value. |
Query variables populate their options by running a DQL query. The query must return exactly one field.
{"version": 2,"key": "Service","type": "query","visible": true,"editable": true,"input": "smartscapeNodes SERVICE | fields name | sort name asc","multiple": false}
For multi-select with all values selected by default, set "multiple": true and use the all-selected default token:
{"version": 2,"key": "Services","type": "query","visible": true,"editable": true,"input": "smartscapeNodes SERVICE | fields name | sort name asc","multiple": true,"defaultValue": "3420b2ac-f1cf-4b24-b62d-61ba1ba8ed05*"}
Use version: 2 for new dashboards (supports fetch, expand, summarize). version: 1 is legacy.
Text variables accept free-form user input.
{"version": 1,"key": "Threshold","type": "text","visible": true,"editable": true,"defaultValue": ""}
CSV variables provide a static predefined list of values.
{"version": 1,"key": "Status","type": "csv","visible": true,"editable": true,"input": "WARN,ERROR,INFO,NONE","multiple": true,"defaultValue": "3420b2ac-f1cf-4b24-b62d-61ba1ba8ed05*"}
Reference a variable in DQL using $key.
| Variable config | Query pattern |
|---|---|
Single-select ( |
|
Multi-select ( |
|
Use modifiers when the default string substitution is not appropriate:
| Modifier | Use for | Example |
|---|---|---|
| Numeric or duration parameters |
|
| Field name in |
|
| String constants in |
|
Variables can reference other variables. A dependent variable recalculates when the variable it depends on changes. Circular dependencies are not allowed.
settings is an optional object. If present, it can be empty ({}) or contain dashboard-level configuration.
"settings": {"defaultTimeframe": {"value": {"from": "now()-2h","to": "now()"},"enabled": true}}
defaultTimeframe sets the time range shown in tiles that don't override the timeframe. It also determines the window for which annotations are evaluated.
Dynatrace validates a dashboard's JSON when you save changes in the JSON editor. If validation fails, the editor shows the error and prevents saving until you fix it.
Starting with Dynatrace version 1.342, dashboards that fail validation will not load. To fix a dashboard that fails validation, open it in
Dashboards and select Edit JSON from the dashboard menu.
When you open a dashboard that has validation errors, a notification appears in the lower-left corner. The actions available depend on your permissions:
Error
Missing required property 'type' of tile id '10'. Expected one of: 'data', 'code', 'markdown', 'slo'
Cause: The tile is missing a required type property. A common cause is uploading a classic dashboard to
Dashboards, which uses a different JSON schema.
Fix: Add a valid type property to the tile. Supported values are data, code, markdown, and slo.
Error
Invalid value 'graph' for property 'subType' of tile id '10'. Expected one of: 'dql-builder-logs', 'dql-builder-metrics', 'dql-builder-biz-events', 'dql-builder-events', 'dql-builder-traces', 'dql-builder-problems', 'dql-builder-user-sessions', 'dql-builder-user-events', 'dql-builder-security-events', 'davis-copilot'
Cause: The subType property contains a value not recognized by
Dashboards.
Fix: Change subType to one of the supported values listed in the error message.
Error
Invalid type for property 'timeframe' of tile id '10' (expected object, received string)
Cause: The timeframe property is a string (for example, "timeframe": "last 24h") instead of an object.
Fix: Replace the string value with the correct object format:
"timeframe": {"tileTimeframeEnabled": true,"tileTimeframe": {"from": "now()-24h","to": "now()"}}