# Automate export of Kibana dashboard CSV

**URL:** https://discuss.elastic.co/t/automate-export-of-kibana-dashboard-csv/278260
**Category:** Kibana
**Created:** [July 9, 2021, 9:16am UTC](https://discuss.elastic.co/t/automate-export-of-kibana-dashboard-csv/278260 "2021-07-09T09:16:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Core\_Sec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/core_sec/32/78091_2.png) [@Core\_Sec](https://discuss.elastic.co/u/Core_Sec)
#### Post date: [July 9, 2021, 9:16am UTC](https://discuss.elastic.co/t/automate-export-of-kibana-dashboard-csv/278260/1 "2021-07-09T09:16:17Z")

</div>

Hi All,

I need to download the CSV data that generated by Kibana dashboard.

![image](https://us1.discourse-cdn.com/elastic/original/3X/e/b/ebe16510cc5809790d0e4b9b57b75f337d40124a.png)

I'm struggling with selenium to automate the manual download without much luck

But it seems like very not generic and robust way to do that, looking for css and class elements which probably change between versions and will probably break.

If i understood correctly there isn't formal API for that

How can i do that?

Any help would be appreciated  
Regards

---

<div class="post-metadata">

### Author: ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)
#### Post date: [July 9, 2021, 11:38am UTC](https://discuss.elastic.co/t/automate-export-of-kibana-dashboard-csv/278260/2 "2021-07-09T11:38:16Z")

</div>

Hi,

there is no API to download CSV from a visualization on a dashboard. This export and generation of CSV is happening client-side in your browser for the data loaded, thus nothing that has a server side API.

You can though inspect the query that is send behind that chart and potentially just write your own script that sends that query to Elasticsearch directly and converts it into a CSV, but currently Kibana doesn't offer something for that.

Cheers,  
Tim

---

<div class="post-metadata">

### Author: ![Core\_Sec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/core_sec/32/78091_2.png) [@Core\_Sec](https://discuss.elastic.co/u/Core_Sec)
#### Post date: [July 9, 2021, 12:10pm UTC](https://discuss.elastic.co/t/automate-export-of-kibana-dashboard-csv/278260/3 "2021-07-09T12:10:57Z")

</div>

Thanks for your answer!

So there's no official way for automated testing of the values the Kibanas' dashboard show?

How can I extract that ES query?

---

<div class="post-metadata">

### Author: ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)
#### Post date: [July 9, 2021, 12:21pm UTC](https://discuss.elastic.co/t/automate-export-of-kibana-dashboard-csv/278260/4 "2021-07-09T12:21:05Z")

</div>

There is no API to extract those values from a dashboard panel, no. Except as you are doing by using an browser automation tool.

You can see the query by using the Inspector:

![screenshot-20210709-141914](https://us1.discourse-cdn.com/elastic/original/3X/9/7/97b3acf77964536ef5d3ba5e124cc87d0e3d8949.png)

And then Select on the top "View: Request". This is not available though for all visualization types, e.g. TSVB visualizations don't have that option.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 6, 2021, 12:21pm UTC](https://discuss.elastic.co/t/automate-export-of-kibana-dashboard-csv/278260/5 "2021-08-06T12:21:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
