Spec-Zone.ru › Elasticsearch 7
›Elasticsearch Guide [7.17] ›REST APIs ›Machine learning anomaly detection APIs

Create filters API

Instantiates a filter.

Request

PUT _ml/filters/<filter_id>

Prerequisites

Requires the manage_ml cluster privilege. This privilege is included in the machine_learning_admin built-in role.

Description

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 parameters

<filter_id>
(Required, string) A string that uniquely identifies a filter.

Request body

description
(Optional, string) A description of the filter.
items
(Required, 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.

Examples

PUT _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"]
}

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/ml-put-filter.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API