# Execute Kibana savedsearch using curl command

**URL:** <https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779>\
**Category:** Kibana\
**Created:** [March 18, 2019, 1:18pm UTC](https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779 "2019-03-18T13:18:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![elborni96](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@elborni96](https://discuss.elastic.co/u/elborni96)\
**Post date:** [March 18, 2019, 1:18pm UTC](https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779/1 "2019-03-18T13:18:32Z")

</div>

Hi all,

i have create a new savedsearch on Kibana.

Now I need to use the curl command from my terminal to recall the results of this savedsearch.

The name of the savedsearch is :

**S-Cert-Feed**

How can i do this task? What is the sintax to invoke this savedsearch?

Best regards,  
Mirko Bornivelli

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [March 18, 2019, 1:45pm UTC](https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779/2 "2019-03-18T13:45:05Z")

</div>

Hi @elborni96,

Saved Searches are not supposed to be executed outside of Kibana context. One option though, would be using CSV export like this via `Copy POST URL`:

 ![Screenshot%20from%202019-03-18%2014-42-38](https://us1.discourse-cdn.com/elastic/original/3X/2/5/2565496a35c3314dc030d3e4c2187a631fc0ca47.png)

Also you can open `Inspect` panel for the saved search and copy actual request from the `Request` tab to execute it directly against ES, but it's not scaleable. So yeah, it depends on what you're trying to achieve exactly.

Best,  
Oleg

---

<div class="post-metadata">

**Author:** ![elborni96](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@elborni96](https://discuss.elastic.co/u/elborni96)\
**Post date:** [March 18, 2019, 2:42pm UTC](https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779/3 "2019-03-18T14:42:08Z")

</div>

Hi @azasypkin

These are the output of my savedsearch:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d9c4ee4c9bb80d49a02e836d4701cca1b4ca6bd9.png)

I need to create a curl string from my terminal to get these results on json format.

It's possible?

Alternatively, can i use a curl string to get events from elasticsearch index?

Thanks,  
Mirko

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [March 18, 2019, 2:52pm UTC](https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779/4 "2019-03-18T14:52:05Z")

</div>

> [@elborni96](#):
>
> I need to create a curl string from my terminal to get these results on json format.  
> It's possible?

Not through Kibana API.

> Alternatively, can i use a curl string to get events from elasticsearch index?

Yeah, of course, if you know the query and have access to the ES instance you can get this data directly [from ES](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html). To get the query you can use `Inspect` for example:

 ![Peek%202019-03-18%2015-47](https://us1.discourse-cdn.com/elastic/original/3X/5/0/50155e013e7c2c7f3fb7651a8bb9879021278d8f.gif)

---

<div class="post-metadata">

**Author:** ![elborni96](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@elborni96](https://discuss.elastic.co/u/elborni96)\
**Post date:** [March 18, 2019, 3:36pm UTC](https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779/5 "2019-03-18T15:36:43Z")

</div>

@azasypkin

Thank you so much for the support.

Best regards,  
Mirko Bornivelli

---

<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:** [April 15, 2019, 3:36pm UTC](https://discuss.elastic.co/t/execute-kibana-savedsearch-using-curl-command/172779/6 "2019-04-15T15:36:44Z")

</div>

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