Export Dashboards programmatically

Hi.

I need to export the JSON models of all my dashboards that were made with the GUI in order to import them in another Grafana instance.
I tried with the dashboard API - api/dashboards/ using curl with the dashboard uuid or uri (db/).
but for some reason I always get the message not found

The uids and uris I found with

$URL/api/search?query=&

Then I tried to get the models or any data

curl -k -H “Authorization: Bearer $KEY” $URL/api/dashboards/db/$dash_name

or

curl -k -H “Authorization: Bearer $KEY” $URL/api/dashboards/uid/$uid

the result is the same.

Does anyone know why is that? I couldn’t find any info anywhere else.

Thanks in advance.

Hi @simonbeltram

There are a handful of good third-party tools for downloading and exporting dashboards, and other grafana data like settings. Here is a list I’ve started compiling. I’d check out the dashboard export section:

3 Likes

Thanks for the answer. It solved my problem.

1 Like