Creating Dashboards (with the API) from an exported one (from the web app)

I exported a dashboard I’ve setup and would like to use as a template.
But I failed to use it from the API :

curl -X POST --insecure -H "Authorization: Bearer <token>" -H "Content-Type: application/json" --data-binary @./template.json  http://localhost:3000/api/dashboards/db

why do the API need a “dashboard” field as I exported one just before ?

How do I have to do that ?

Because web app (UI) and API doesn’t use the same JSON schema.

so how do we do that ?

then, is it possible to export a dashboard from the API instead of the web application?


'im going to try with a GET request

Ok so I used the API with to get the “template” json I made and then post a new ones from a list of servers.