@@ -12,6 +12,7 @@ type DashboardMeta struct {
12
12
IsStarred bool `json:"isStarred"`
13
13
Slug string `json:"slug"`
14
14
Folder int64 `json:"folderId"`
15
+ FolderUID int64 `json:"folderUid"`
15
16
URL string `json:"url"`
16
17
}
17
18
@@ -26,14 +27,14 @@ type DashboardSaveResponse struct {
26
27
27
28
// Dashboard represents a Grafana dashboard.
28
29
type Dashboard struct {
29
- Meta DashboardMeta `json:"meta"`
30
- Model map [string ]interface {} `json:"dashboard"`
31
- FolderID int64 `json:"folderId"`
32
- FolderUID string `json:"folderUid"`
33
- Overwrite bool `json:"overwrite"`
34
-
35
- // This is only used when creating a new dashboard, it will always be empty when getting a dashboard.
36
- Message string `json:"message "`
30
+ Meta DashboardMeta `json:"meta"`
31
+ Model map [string ]interface {} `json:"dashboard"`
32
+ FolderID int64 `json:"folderId"`
33
+
34
+ // These fields are only used when creating a new dashboard, they will always be empty when getting a dashboard.
35
+ Overwrite bool `json:"overwrite,omitempty"`
36
+ Message string `json:"message,omitempty"`
37
+ FolderUID string `json:"folderUid,omitempty "`
37
38
}
38
39
39
40
// SaveDashboard is a deprecated method for saving a Grafana dashboard. Use NewDashboard.
0 commit comments