This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
Delete filters API
editDelete filters API
editDeletes a filter.
Request
editDELETE _ml/filters/<filter_id>
Prerequisites
editRequires the manage_ml
cluster privilege. This privilege is included in the
machine_learning_admin
built-in role.
Description
editThis 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
edit-
<filter_id>
- (Required, string) A string that uniquely identifies a filter.
Examples
editresp = client.ml.delete_filter( filter_id="safe_domains", ) print(resp)
response = client.ml.delete_filter( filter_id: 'safe_domains' ) puts response
const response = await client.ml.deleteFilter({ filter_id: "safe_domains", }); console.log(response);
DELETE _ml/filters/safe_domains
When the filter is deleted, you receive the following results:
{ "acknowledged": true }