Delete filters API

Delete filters API

New API reference

For the most up-to-date API details, refer to Machine learning anomaly detection APIs.

Deletes a filter.

Request

DELETE _ml/filters/<filter_id>

Prerequisites

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

Description

This API deletes a filter. If an anomaly detection job references the filter, you cannot delete the filter. You must update or delete the job before you can delete the filter. For more information, see Custom rules.

Path parameters

<filter_id>

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

Examples

  1. resp = client.ml.delete_filter(
  2. filter_id="safe_domains",
  3. )
  4. print(resp)
  1. response = client.ml.delete_filter(
  2. filter_id: 'safe_domains'
  3. )
  4. puts response
  1. const response = await client.ml.deleteFilter({
  2. filter_id: "safe_domains",
  3. });
  4. console.log(response);
  1. DELETE _ml/filters/safe_domains

When the filter is deleted, you receive the following results:

  1. {
  2. "acknowledged": true
  3. }