原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/ml-get-filter.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/ml-get-filter.html
本地英文版地址: ../en/ml-get-filter.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Get filters APIedit
Retrieves filters.
Prerequisitesedit
-
If the Elasticsearch security features are enabled, you must have
monitor_ml
,monitor
,manage_ml
, ormanage
cluster privileges to use this API. See Security privileges.
Descriptionedit
You can get a single filter or all filters. For more information, see Machine learning custom rules.
Path parametersedit
-
<filter_id>
- (Optional, string) A string that uniquely identifies a filter.
Query parametersedit
-
from
- (Optional, integer) Skips the specified number of filters.
-
size
- (Optional, integer) Specifies the maximum number of filters to obtain.
Response bodyedit
The API returns an array of filter resources, which have the following properties:
-
description
- (string) A description of the filter.
-
filter_id
- (string) A string that uniquely identifies a filter.
-
items
- (array of strings) An array of strings which is the filter item list.
Examplesedit
GET _ml/filters/safe_domains
The API returns the following results:
{ "count": 1, "filters": [ { "filter_id": "safe_domains", "description": "A list of safe domains", "items": [ "*.google.com", "wikipedia.org" ] } ] }