You should be able to use the saved searches in .kibana to do direct queries to ES

I'm referencing this closed topic by @eebee and @tsullivan here regarding using the data in the .kibana saved searches to query elasticsearch directly. Get data from saved objects through REST

I honestly think the given answer is weak. There is no reason a valid query could not, and should not be saved into the index. It is perfectly reasonable for someone to build an application outside of kibana but want to leverage the search creating functionality of kibana. Off the top of my head, any application that needs to do heavy ML processing of NNs across GPUs would be hard pressed to do it with node via the kibana dashboard. Python and TensorFlow are much more suited. It is also reasonable to think the user would want to automate it by some method of retreving the RESULTS of the "saved searches. Whether that is by getting a valid Elasticsearch query or through a REST endpoint that returns results.

Its impossible currently, because we have to "trust" the APIs for how the query is saved in kibana, won't change for new ways of displaying the data in kibana. Seems to me kibana should be saving the raw query into elasticsearch, or at the very least, expose an endpoint that returns it when requested.

Looks to me like I am correct in assuming that maintenance will be needed if kibana is ever changed: Constructing a Request Using Kibana Saved Search Information

It also looks like there was a PR to add an REST API to do this potentially: https://github.com/elastic/kibana/pull/11632

Still think there should be a straight forward way to load your "saved search" outside of kibana.

Here is another thread requesting the same feature: this one's response didn't even attempt to help the user, at least the one in the last reply explained how to do it with the current kibana implementation. How to execute save search from REST API in elasticsearch

Here is yet another thread requesting the same functionality: Executing kibana saved searches programatically?

This one was ignored after the initial reply

Hey @ThickFreeze,

The PR you mentioned above (https://github.com/elastic/kibana/pull/11632) will expose an API to manage saved objects, as opposed to saved searches. Saved Searches are one type of saved object, and if I understand the PR correctly, it is not designed to be able to execute the queries within the saved search.

Based on your research, this sounds like a feature that several people are interested in having. As this isn't currently supported, I'd suggest creating a feature request to get this added.

Thanks!

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