Using kibana saved_object _find api and return only selected field from nested json

Hi,

I want to be able to getall index-pattern objects and only return their title attribute. However, title is embedded in the attribute json object. How do I do this?

GET api/saved_objects/_find?type=index-pattern&fields=attributes.title ?

Example data:

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

https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html

Hi @preddy75,

The fields parameter doesn't need the attributes. prefix for the fields, it automatically gets prefixed in the API.

Something like the following should do the trick: GET api/saved_objects/_find?type=index-pattern&fields=title.

Hope this helps,
Mike.

Also note there is currently no feature to remove fields outside attributes object. Those fields currently always return.