--
:api: delete-filter
:request: DeleteFilterRequest
:response: AcknowledgedResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Delete filters API

Deletes a {ml} filter.
The API accepts a +{request}+ and responds
with a +{response}+ object.

[id="{upid}-{api}-request"]
==== Delete filters request

A +{request}+ object requires a non-null `filterId`.

["source","java",subs="attributes,callouts,macros"]
---------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
---------------------------------------------------
<1> Constructing a new request referencing an existing filter

[id="{upid}-{api}-response"]
==== Delete filters response

The returned +{response}+ object indicates the acknowledgement of the request:
["source","java",subs="attributes,callouts,macros"]
---------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
---------------------------------------------------
<1> `isAcknowledged` was the deletion request acknowledged or not

include::../execution.asciidoc[]
