# Run remote KQL query

**URL:** <https://discuss.elastic.co/t/run-remote-kql-query/341615>\
**Category:** Kibana\
**Tags:** kql-kibana-query-language\
**Created:** [August 24, 2023, 8:18pm UTC](https://discuss.elastic.co/t/run-remote-kql-query/341615 "2023-08-24T20:18:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mladen](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@mladen](https://discuss.elastic.co/u/mladen)\
**Post date:** [August 24, 2023, 8:18pm UTC](https://discuss.elastic.co/t/run-remote-kql-query/341615/1 "2023-08-24T20:18:21Z")

</div>

Hi,

We have some saved searches written using Kibana Query Language in Kibana. Now we have an idea to automatize the process of getting data. Idea is to create some bash scripts and using curl to run saved queries in Kibana. We have 8.5 version of elasticsearch and kibana.

My question is this possible because I didn’t find anything useful in Kibana API?

BR,  
Mladen

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [September 4, 2023, 1:19pm UTC](https://discuss.elastic.co/t/run-remote-kql-query/341615/2 "2023-09-04T13:19:42Z")

</div>

As you guessed, Kibana API does not expose a way to execute a saved search.

On the other hand, the reporting feature in Kibana allows to generate a `POST URL` that allows to produce a CSV export to be downloaded in a second call.

> **[Automatically generate reports | Kibana Guide \[8.9\] | Elastic](https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html)**

---

<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:** [October 2, 2023, 1:20pm UTC](https://discuss.elastic.co/t/run-remote-kql-query/341615/3 "2023-10-02T13:20:05Z")

</div>

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