How to create a search saved object with kibana API

I tried to create a search saved object with kibana API. I could able to create the object with selected columns and sort, but I am unable to add filters to the search.

Below is the body of POST call I used.

  "attributes": {
    "title": "object 1",
    "columns": [
    "sort": "@timestamp"

I am not sure on adding filters to the search. Can someone please help me here.

Hi @BhavyaSree welcome to the community!

I often suggest folks to create an object to through the Kibana UI first (in your case a saved search which you can do though Discover) and then run the Find and Get saved object APIs and see what it looks like and then you can use that as a template for how to create one like you want.

Perhaps give that a try.

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