Call to saved_objects API fails with "illegal_argument_exception"

I'm on Elastic stack v 7.6 and trying to get the JSON representation of a Kibana index pattern via the saved_objects API as explained here.

I tried issuing a GET request via Postman to:

https://mydomain/api/saved_objects/_find?type=index-pattern&search_fields=title&search=logstash*

but get the following error:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "request [/api/saved_objects/_find] contains unrecognized parameters: [search], [search_fields] -> did you mean [stored_fields]?"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "request [/api/saved_objects/_find] contains unrecognized parameters: [search], [search_fields] -> did you mean [stored_fields]?"
  },
  "status": 400
}

What am I doing wrong?

It seems like you might be sending this request to your Elasticsearch server instead of Kibana? The saved objects API is a Kibana API, so https://mydomain should point to Kibana.

1 Like

Indeed, that solved the problem, thank you :slight_smile:

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