Get filters APIedit

Retrieves filters.

Requestedit

GET _ml/filters/<filter_id>

GET _ml/filters/

Prerequisitesedit

  • You must have monitor_ml, monitor, manage_ml, or manage cluster privileges to use this API. For more information, 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
(string) Identifier for the filter.

Query parametersedit

from
(integer) Skips the specified number of filters.
size
(integer) Specifies the maximum number of filters to obtain.

Response bodyedit

The API returns the following information:

filters
(array) An array of filter resources. For more information, see Filter resources.

Examplesedit

The following example gets configuration information for the safe_domains filter:

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