IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Update filter API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Update filter API
editUpdates the description of a filter, adds items, or removes items.
Request
editPOST _ml/filters/<filter_id>/_update
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have
manage_mlormanagecluster privileges to use this API. See Security privileges.
Path parameters
edit-
<filter_id> - (Required, string) Identifier for the filter.
Request body
edit-
add_items - (Optional, array of strings) The items to add to the filter.
-
description - (Optional, string) A description for the filter.
-
remove_items - (Optional, array of strings) The items to remove from the filter.
Examples
editYou can change the description, add and remove items to the safe_domains
filter as follows:
POST _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"]
}