Update a filter
Generally available; Added in 6.4.0
Updates the description of a filter, adds items, or removes items from the list.
Required authorization
- Cluster privileges:
manage_ml
Path parameters
-
filter_id
string Required A string that uniquely identifies a filter.
Body
Required
-
add_items
array[string] The items to add to the filter.
-
description
string A description for the filter.
-
remove_items
array[string] The items to remove from the filter.
POST
/_ml/filters/{filter_id}/_update
Console
POST _ml/filters/safe_domains/_update
{
"description": "Updated list of domains",
"add_items": ["*.myorg.com"],
"remove_items": ["wikipedia.org"]
}
curl \
--request POST 'http://api.example.com/_ml/filters/{filter_id}/_update' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"description\": \"Updated list of domains\",\n \"add_items\": [\"*.myorg.com\"],\n \"remove_items\": [\"wikipedia.org\"]\n}"'
Request example
An example body for a `POST _ml/filters/safe_domains/_update` request.
{
"description": "Updated list of domains",
"add_items": ["*.myorg.com"],
"remove_items": ["wikipedia.org"]
}