API endpoint to export data

Hello,

Is there an API endpoint to export grafana table data as CSV or excel file? I am new to grafana and did not find anything like this. I want to export data programmatically rather than using “Export CSV” option everytime. Please let me know how it can be implemented.

Thanks in advacne!

1 Like

Unfortunately there isn’t anything like this currently. See also Python script to export csv files of specific panel/ time range

1 Like

@svetb Thanks for quick response. I tried extracting the queries from the dashboard’s JSON definition and ran them directly from the python script, which then assembled the results into an excel. But it did not return the panel title. In my case I have 2 tables with similar column names and different table panel title. So is there any way I can export panel title along with JSON response using python script.

Thanks in advance!

Great, that’s quite impressive!

The panel titles should also be available in the dashboard JSON, so maybe look a bit closer at that. The queries you’ve extracted should then be contained within their respective panel objects. So if you traverse the JSON you should be able to (a) pick up a panel’s title, and (b) pick up the specific queries for that panel - then iterate though all panels.

1 Like

Hello,
@svetb quick question, is there any update on this or is it still not available?
Thanks.

I haven’t kept up-to-date on this, but I haven’t personally come across updates.

This topic was automatically closed after 365 days. New replies are no longer allowed.