Create CSV from (Lens) Table via API / URL

Hi all,

I wonder if it is possible to create CSV reports from (Lens) tables via an API / URL? I couldn't find anything on that in the documentation.

Some background on our use case:
We would like to automatically send out the contents of a Kibana table via a watcher. The table is a Lens table, but we could recreate it with a different editor if that would offer more possibilities regarding automatic CSV export.

The table is quite big, hence a pdf export didn't work very well for us.

Version:
We're using 7.16, but will migrate to 8.x soon.

Thank you and best regards
Bianca

Hi @bianca_s

since 8.14 ES|QL reached the GA status, and that would help to produce programmatically CSV with aggregations with a REST API: here more details about the new query language and available outputs

Hi Marco, thank you for your response, I will look into this. I am not sure though if this will be the right approach for us. Is it correct that ESQL cannot be integrated into watchers? I think search inputs can only handle the Query DSL.

You could use Kibana Alerts for that kind of use case rather than Watchers.

Thank you, I will look into this!