How to update an existing index pattern through the Dashboards API?

How do I update a previously created index pattern through the Dashboards API, without generating duplicate index patterns? Is it possible to create and subsequently update the same index pattern using identical HTTP POST or PUT requests?

Sure, you can try like this:

curl -X PUT api/saved_objects/index-pattern/my-pattern -H 'osd-xsrf: true'

please refer to kibana’s documentation.

But we wouldn’t be able to create and update the index pattern with this PUT request, or can we?

According to the Kibana 7.10 docs, we can create and update an index pattern using a POST request to a URL like api/saved_objects/index-pattern/my-pattern?overwrite=true, i.e. using the query parameter overwrite.

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