Reputation: 109
I have about 50 reports in Grafana and many of them have Datalinks with URLs and variables. I would like to move the reports to another domain which means all these URLs need to be updated with the "domain portion" of the new domain.
Is there a way to programmatically do it?
I find it tedious to do it report by report. As there are way too many.
Please advise.
Upvotes: 0
Views: 613
Reputation: 15
Thanks @Jens Baitinger
Your tip helped. Though I did not try the API yet, (which I will). I has exported the report to migrate to the new server and discovered the data link urls are present there. I was able to do an update.
So now I have options.
Thank You
Upvotes: 0
Reputation: 2365
You can use the Grafana REST API to access the json definition of your dashboards.
The rest is 'just' iterating over all dashboards, receiving the code, search and replace and posting the changed dashboard code back to Grafana
Upvotes: 1