A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
Specifically, filters are referenced in the custom_rules property of detector configuration objects.
##Required authorization
- Cluster privileges:
manage_ml
PUT
/_ml/filters/{filter_id}
Console
PUT _ml/filters/safe_domains
{
"description": "A list of safe domains",
"items": ["*.google.com", "wikipedia.org"]
}
curl \
--request PUT 'http://api.example.com/_ml/filters/{filter_id}' \
--header "Content-Type: application/json" \
--data '"{\n \"description\": \"A list of safe domains\",\n \"items\": [\"*.google.com\", \"wikipedia.org\"]\n}"'
Request example
An example body for a `PUT _ml/filters/safe_domains` request.
{
"description": "A list of safe domains",
"items": ["*.google.com", "wikipedia.org"]
}