Create Shareable Links to Query via API

Hi,
I would like to generate a shareable link to a Query under Discover in Kibana via an API. Like filters/index/timeframe should be set via an automation. Is there any way to do that? In the documentation I can only find it via the Share button in the UI.
Thanks in advance.

Hi @seboz123 , welcome to our community.

Have you tried Create saved query API | Kibana Guide [8.15] | Elastic ?

Regards,
Alex

Hi @Alex_Salgado-Elastic ,
thanks for your answer.
I think this is not what I need - I do not use osquery/SQL but rather use KQL to filter the data of my index - once I have the data filtered, I click on share on the upper right border