IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Create filter APIedit
Instantiates a filter.
Requestedit
PUT _xpack/ml/filters/<filter_id>
Descriptionedit
A filter contains a list of strings.
It can be used by one or more jobs. Specifically, filters are referenced in
the custom_rules
property of detector configuration objects.
Path Parametersedit
-
filter_id
(required) - (string) Identifier for the filter.
Request Bodyedit
-
description
- (string) A description of the filter.
-
items
-
(array of strings) The items of the filter.
A wildcard
*
can be used at the beginning or the end of an item. Up to 10000 items are allowed in each filter.
Authorizationedit
You must have manage_ml
, or manage
cluster privileges to use this API.
For more information, see
Security privileges.
Examplesedit
The following example creates the safe_domains
filter:
PUT _xpack/ml/filters/safe_domains { "description": "A list of safe domains", "items": ["*.google.com", "wikipedia.org"] }
When the filter is created, you receive the following response:
{ "filter_id": "safe_domains", "description": "A list of safe domains", "items": ["*.google.com", "wikipedia.org"] }