Search code examples
kibanaquerydslelkopensearchamazon-opensearch

Is it possible to change/ set filter value on kibana via query


I got multiple visualizations that filtered on same field and value, value=x.

{
  "query": {
    "bool": {
      "should": [
        {
          "match_phrase": {
            "value.keyword": "x"
          }
        }
      ],
      "minimum_should_match": 1
    }
  }
}

From time to time I need to change that value, I want to avoid entering each visualization and changing it, is it possible to automate the process ?

Is it possible to change/ set filter value via query ?


Solution

  • Found link to kibana API using UPDATE option doing the job

    $ curl -X PUT api/index_patterns/index-pattern/my-pattern
    {
      "attributes": {
        "title": "some-other-pattern-*"
      }
    }
    

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