docs: adds uid to dashboard.json reference docs
This commit is contained in:
@@ -10,7 +10,7 @@ weight = 100
|
|||||||
|
|
||||||
# Dashboard JSON
|
# Dashboard JSON
|
||||||
|
|
||||||
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from rows, panels, template variables, panel queries, etc.
|
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from panels, template variables, panel queries, etc.
|
||||||
|
|
||||||
To view the JSON of a dashboard, follow the steps mentioned below:
|
To view the JSON of a dashboard, follow the steps mentioned below:
|
||||||
|
|
||||||
@@ -27,6 +27,7 @@ When a user creates a new dashboard, a new dashboard JSON object is initialized
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"id": null,
|
"id": null,
|
||||||
|
"uid": "cLV5GDCkz",
|
||||||
"title": "New dashboard",
|
"title": "New dashboard",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"style": "dark",
|
"style": "dark",
|
||||||
@@ -34,7 +35,7 @@ When a user creates a new dashboard, a new dashboard JSON object is initialized
|
|||||||
"editable": true,
|
"editable": true,
|
||||||
"hideControls": false,
|
"hideControls": false,
|
||||||
"graphTooltip": 1,
|
"graphTooltip": 1,
|
||||||
"rows": [],
|
"panels": [],
|
||||||
"time": {
|
"time": {
|
||||||
"from": "now-6h",
|
"from": "now-6h",
|
||||||
"to": "now"
|
"to": "now"
|
||||||
@@ -58,7 +59,8 @@ Each field in the dashboard JSON is explained below with its usage:
|
|||||||
|
|
||||||
| Name | Usage |
|
| Name | Usage |
|
||||||
| ---- | ----- |
|
| ---- | ----- |
|
||||||
| **id** | unique dashboard id, an integer |
|
| **id** | unique numeric identifier for the dashboard. (generated by the db) |
|
||||||
|
| **uid** | unique dashboard identifier that can be generated by anyone. string (8-40) |
|
||||||
| **title** | current title of dashboard |
|
| **title** | current title of dashboard |
|
||||||
| **tags** | tags associated with dashboard, an array of strings |
|
| **tags** | tags associated with dashboard, an array of strings |
|
||||||
| **style** | theme of dashboard, i.e. `dark` or `light` |
|
| **style** | theme of dashboard, i.e. `dark` or `light` |
|
||||||
@@ -66,7 +68,6 @@ Each field in the dashboard JSON is explained below with its usage:
|
|||||||
| **editable** | whether a dashboard is editable or not |
|
| **editable** | whether a dashboard is editable or not |
|
||||||
| **hideControls** | whether row controls on the left in green are hidden or not |
|
| **hideControls** | whether row controls on the left in green are hidden or not |
|
||||||
| **graphTooltip** | 0 for no shared crosshair or tooltip (default), 1 for shared crosshair, 2 for shared crosshair AND shared tooltip |
|
| **graphTooltip** | 0 for no shared crosshair or tooltip (default), 1 for shared crosshair, 2 for shared crosshair AND shared tooltip |
|
||||||
| **rows** | row metadata, see [rows section](#rows) for details |
|
|
||||||
| **time** | time range for dashboard, i.e. last 6 hours, last 7 days, etc |
|
| **time** | time range for dashboard, i.e. last 6 hours, last 7 days, etc |
|
||||||
| **timepicker** | timepicker metadata, see [timepicker section](#timepicker) for details |
|
| **timepicker** | timepicker metadata, see [timepicker section](#timepicker) for details |
|
||||||
| **templating** | templating metadata, see [templating section](#templating) for details |
|
| **templating** | templating metadata, see [templating section](#templating) for details |
|
||||||
@@ -75,39 +76,6 @@ Each field in the dashboard JSON is explained below with its usage:
|
|||||||
| **version** | version of the dashboard (integer), incremented each time the dashboard is updated |
|
| **version** | version of the dashboard (integer), incremented each time the dashboard is updated |
|
||||||
| **links** | TODO |
|
| **links** | TODO |
|
||||||
|
|
||||||
### rows
|
|
||||||
|
|
||||||
`rows` field consists of an array of JSON object representing each row in a dashboard, such as shown below:
|
|
||||||
|
|
||||||
```json
|
|
||||||
"rows": [
|
|
||||||
{
|
|
||||||
"collapse": false,
|
|
||||||
"editable": true,
|
|
||||||
"height": "200px",
|
|
||||||
"panels": [],
|
|
||||||
"title": "New row"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"collapse": true,
|
|
||||||
"editable": true,
|
|
||||||
"height": "300px",
|
|
||||||
"panels": [],
|
|
||||||
"title": "New row"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Usage of the fields is explained below:
|
|
||||||
|
|
||||||
| Name | Usage |
|
|
||||||
| ---- | ----- |
|
|
||||||
| **collapse** | whether row is collapsed or not |
|
|
||||||
| **editable** | whether a row is editable or not |
|
|
||||||
| **height** | height of the row in pixels |
|
|
||||||
| **panels** | panels metadata, see [panels section](#panels) for details |
|
|
||||||
| **title** | title of row |
|
|
||||||
|
|
||||||
#### panels
|
#### panels
|
||||||
|
|
||||||
Panels are the building blocks a dashboard. It consists of datasource queries, type of graphs, aliases, etc. Panel JSON consists of an array of JSON objects, each representing a different panel in a row. Most of the fields are common for all panels but some fields depends on the panel type. Following is an example of panel JSON representing a `graph` panel type:
|
Panels are the building blocks a dashboard. It consists of datasource queries, type of graphs, aliases, etc. Panel JSON consists of an array of JSON objects, each representing a different panel in a row. Most of the fields are common for all panels but some fields depends on the panel type. Following is an example of panel JSON representing a `graph` panel type:
|
||||||
@@ -266,16 +234,8 @@ Panels are the building blocks a dashboard. It consists of datasource queries, t
|
|||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
Usage of each field is explained below:
|
|
||||||
|
|
||||||
| Name | Usage |
|
|
||||||
| ---- | ----- |
|
|
||||||
| TODO | TODO |
|
|
||||||
|
|
||||||
### timepicker
|
### timepicker
|
||||||
|
|
||||||
Description: TODO
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"timepicker": {
|
"timepicker": {
|
||||||
"collapse": false,
|
"collapse": false,
|
||||||
@@ -416,7 +376,3 @@ Usage of the above mentioned fields in the templating section is explained below
|
|||||||
| **refresh** | TODO |
|
| **refresh** | TODO |
|
||||||
| **regex** | TODO |
|
| **regex** | TODO |
|
||||||
| **type** | type of variable, i.e. `custom`, `query` or `interval` |
|
| **type** | type of variable, i.e. `custom`, `query` or `interval` |
|
||||||
|
|
||||||
### annotations
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|||||||
Reference in New Issue
Block a user