Update Filter APIedit

Updates the description of a filter, adds items, or removes items.

Requestedit

POST _xpack/ml/filters/<filter_id>/_update

Path Parametersedit

filter_id (required)
(string) Identifier for the filter.

Request Bodyedit

description
(string) A description for the filter. See Filter Resources.
add_items
(array of strings) The items to add to the filter.
remove_items
(array of strings) The items to remove from the filter.

Authorizationedit

You must have manage_ml, or manage cluster privileges to use this API. For more information, see Security Privileges.

Examplesedit

You can change the description, add and remove items to the safe_domains filter as follows:

POST _xpack/ml/filters/safe_domains/_update
{
  "description": "Updated list of domains",
  "add_items": ["*.myorg.com"],
  "remove_items": ["wikipedia.org"]
}

The API returns the following results:

{
  "filter_id": "safe_domains",
  "description": "Updated list of domains",
  "items": ["*.google.com", "*.myorg.com"]
}