Path parameters
- filter_id
string Required A string that uniquely identifies a filter.
BodyRequired
- 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"]
}
resp = client.ml.update_filter(
filter_id="safe_domains",
description="Updated list of domains",
add_items=[
"*.myorg.com"
],
remove_items=[
"wikipedia.org"
],
)
const response = await client.ml.updateFilter({
filter_id: "safe_domains",
description: "Updated list of domains",
add_items: ["*.myorg.com"],
remove_items: ["wikipedia.org"],
});
response = client.ml.update_filter(
filter_id: "safe_domains",
body: {
"description": "Updated list of domains",
"add_items": [
"*.myorg.com"
],
"remove_items": [
"wikipedia.org"
]
}
)
$resp = $client->ml()->updateFilter([
"filter_id" => "safe_domains",
"body" => [
"description" => "Updated list of domains",
"add_items" => array(
"*.myorg.com",
),
"remove_items" => array(
"wikipedia.org",
),
],
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"description":"Updated list of domains","add_items":["*.myorg.com"],"remove_items":["wikipedia.org"]}' "$ELASTICSEARCH_URL/_ml/filters/safe_domains/_update"
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"]
}