Powershell Script to Export Grafana dashboard Data into JSON File

HI All,

I have an requirement to Export Grafana Dashboard data into JSON file via Scripting. I need to Pass Date Range Parameters in the script to download the dashboard data as a JSON file. Could anyone please help me on the script so that would be very helpful for me.



What is the purpose of this requirement. What is the end goal of the json file?

Hi @yosiasz,

Just we are developing an Script to get the JSON file for one of the dashboards. Instead of login to grafana everytime, just user will run the script with DATE Range as one of the parameters. So once we pass the parameters then it should download the JSON file with the dashboard data. If you could help us with the script whether its powershell or bash, main thing is to pass the date range parameters to pull the dashboard data as JSON. Please help out on this.


Hi @yosiasz , If you have any idea on this please help me out.

So still not sure what the purpose of this is for? how will the JSON be used? all you need is the resulting data of the query that is run in grafana?