Created
October 7, 2015 20:35
-
-
Save crisidev/bd52bdcc7f029be2f295 to your computer and use it in GitHub Desktop.
Command to export all grafana 2 dashboard to JSON using curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KEY=XXXXXXXXXXXX | |
HOST="https://metrics.crisidev.org" | |
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do | |
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it doesn't work wuth grafana v7.3.1 API :(
It's seems like folderUid doesn't exist in meta block ..