Import doesn't work without manual edit of exported dashboard

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

Hi,

That’s not an export, just a HTTP GET from the api. You need to use the UI to export a dashboard.

Marcus

You need to use

ok, that makes reasonable sense.

do you know, which format does wizzy export dashboards retrieve them in?

Wizzy will do HTTP GET’s when exporting

Marcus

Are there any plans for an export API? I’m trying to automate the backing up and restoring of dashboards.

No. You can easily write a script using the dashboard search api and then fetching each dashboard thru dashboard api.