Skip to content

Dashboard not found error on import #10

@DerfOh

Description

@DerfOh

Error received

curl -XPOST -i http://localhost:3000/api/dashboards/db -u xxxx:xxxxx --data-binary @./desktop.json -H "Content-Type: application/json"
HTTP/1.1 100 Continue

HTTP/1.1 404 Not Found
Content-Type: application/json
Date: Mon, 15 Apr 2019 15:57:45 GMT
Content-Length: 54''
{“message”:“Dashboard not found”,“status”:“not-found”}

Root Cause:

File export includes the 'id' of the dashboard. This needs to be set to 'null' in order to be imported.

image

Also see: https://community.grafana.com/t/unable-to-create-grafana-dashboard-through-api-but-working-through-ui-import-option-with-same-json-file/2470

Workaround:

Execute the following in the dashboards directory (works with GNU sed only)

sed -i '0,/"id": .*/{s/"id": .*/"id": null,/}' *.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions