A dashboard in Grafana is represented by a JSON object, which stores dashboard metadata, rows of panels, 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 rows, 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, you can click on "Manage dashboard" cog menu and select "View JSON" from it.
1. Go to a dashboard
2. Click on `Manage dashboard` menu on the top navigation bar
3. Select `View JSON` from the dropdown menu
## Basic fields
## Basic fields
A dashboard JSON object is initialized with the following fields when it is created.
When a user creates a new dashboard, a new dashboard JSON object is initialized with the following fields:
> Note: In the following JSON, id is shown as null which is the default value assigned to it until the dashboard is not saved. Once saved, an integer value is assigned to the `id` field.
```
```
{
{
...
@@ -26,7 +30,7 @@ A dashboard JSON object is initialized with the following fields when it is crea
...
@@ -26,7 +30,7 @@ A dashboard JSON object is initialized with the following fields when it is crea
"tags": [],
"tags": [],
"style": "dark",
"style": "dark",
"timezone": "browser",
"timezone": "browser",
"editable": true,
"editable": true,
"hideControls": false,
"hideControls": false,
"sharedCrosshair": false,
"sharedCrosshair": false,
"rows": [
"rows": [
...
@@ -78,3 +82,24 @@ A dashboard JSON object is initialized with the following fields when it is crea
...
@@ -78,3 +82,24 @@ A dashboard JSON object is initialized with the following fields when it is crea
"links": []
"links": []
}
}
```
```
Each field in the dashboard JSON is explained below with its usage:
| Name | Usage |
| ---- | ----- |
| **id** | unique dashboard id, an integer |
| **title** | current title of dashboard |
| **originalTitle** | title of dashboard when saved for the first time |
| **tags** | an array of strings storing tags associated with dashboard |
| **style** | theme of dashboard, i.e. dark or light |
| **timezone** | timezone of dashboard, i.e. utc or browser |
| **editable** | whether a dashboard is editable or not |
| **hideControls** | whether row controls on the left in green are hidden or not |
| **sharedCrosshair** | TODO |
| **rows** | row metadata, see rows section for details |
| **time** | time range of dashboard, i.e. last 6 hours, last 7 days, etc |
| **timepicker** | timepicker metadata, see timepicker section for details |
| **templating** | timeplating metadata, see templating section for details |
| **annotations** | annotations metadata, see annotations section for details |