Find objects APIedit

[preview] This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Retrieve a paginated set of Kibana saved objects by various conditions.

Requestedit

GET /api/saved_objects/_find

GET /s/<space_id>/api/saved_objects/_find

Path parametersedit

space_id
(Optional, string) An identifier for the space. If space_id is not provided in the URL, the default space is used.

Query Parametersedit

type
(Required, array|string) The saved object types to include in the export.
per_page
(Optional, number) The number of objects to return per page.
page
(Optional, number) The page of objects to return.
search
(Optional, string) An Elasticsearch simple_query_string query that filters the objects in the response.
default_search_operator
(Optional, string) The default operator to use for the simple_query_string.
search_fields
(Optional, array|string) The fields to perform the simple_query_string parsed query against.
fields
(Optional, array|string) The fields to return in the attributes key of the response.
sort_field
(Optional, string) The field that sorts the response.
has_reference
(Optional, object) Filters to objects that have a relationship with the type and ID combination.

As objects change in Kibana, the results on each page of the response also change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.

Response codeedit

200
Indicates a successful call.

Examplesedit

Find index patterns with titles that start with my:

GET api/saved_objects/_find?type=index-pattern&search_fields=title&search=my*

The API returns the following:

{
  "total": 1,
  "data": [
    {
      "id": "my-pattern",
      "type": "index-pattern",
      "version": 1,
      "attributes": {
        "title": "my-pattern-*"
      }
    }
  ]
}

For parameters that accept multiple values (e.g. fields), repeat the query parameter for each value:

GET api/saved_objects/_find?fields=id&fields=title