How can I import a dashboard from a JSON file?

I would like import the JSON file (what has the same structure as a file what I previously exported via web UI) using HTTP API.

I know that it’s possible - my knowledge is based on the documentation page but without an example I don’t know how.

I’ve opened the issue [Feature request] Documentation update for the function: “dashboard from JSON file” on GitHub too. I included in it information how the function (in what places in code) the import function is implemented.

Thank you in advance for any help in that subject.

Wojciech

Based on a discussion on GitHub (please see the issue mentioned above) I state that it’s not possible - the project web page is not updated.

Disclaimer: I haven’t done this personally

Based on the documentation you linked, there is a section on Create/Update Dashboard. Take the JSON for your dashboard and put it in the “dashboard”: attribute in the API call.

POST /api/dashboards/db HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer API_KEY_HERE

{
  "dashboard": {YOUR DASHBOARD JSON HERE},
  "overwrite": false
}