When I use the API to export a dashboard, the json comes back in the following format:
{
"meta": {
"type": "db",
"canSave": false,
"canEdit": false,
"canStar": true,
"slug": "name",
"expires": "0001-01-01T00:00:00Z",
"created": "2017-11-30T15:34:02Z",
"updated": "2017-11-30T15:34:02Z",
"updatedBy": "user",
"createdBy": "user",
"version": 1
},
"dashboard": {
"annotations": {},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
"id": 16,
"links": [],
"refresh": "10s",
"templating": {},
"time": {},
"timepicker": {},
"timezone": "",
"title": "name",
"version": 1
}
}
Importing this json fails. It’s not that there’s an error, it’s just that the new dashboard doesn’t include the data from the json.
If I change the json data to be of the format:
{
"annotations": {},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
"id": 16,
"links": [],
"refresh": "10s",
"templating": {},
"time": {},
"timepicker": {},
"timezone": "",
"title": "name",
"version": 1
}
Than the import works fine.
It seems what happens is that the previous example creates a dashboard that has dashboard.dashboard
I see there’s some nice changes in v5.0.0 that make things better in general, but I’m wondering if this is already known/resolved after 4.6.3