OpenSearch/docs/en/rest-api/ml/delete-datafeed.asciidoc
Lisa Cawley b41ff62bcc [DOCS] Update ML APIs for Elasticsearch Reference (elastic/x-pack-elasticsearch#1718)
* [DOCS] Update ML APIs for Elasticsearch Reference

* [DOCS] Add X-Pack icon for ML APIs

* [DOCS] Add role attribute to ML APIs

Original commit: elastic/x-pack-elasticsearch@997ea39759
2017-06-19 18:23:58 -07:00

56 lines
1.1 KiB
Plaintext

[role="xpack"]
[[ml-delete-datafeed]]
=== Delete {dfeeds-cap}
The delete {dfeed} API enables you to delete an existing {dfeed}.
==== Request
`DELETE _xpack/ml/datafeeds/<feed_id>`
==== Description
NOTE: Unless the `force` parameter is used, the {dfeed} must be stopped before it can be deleted.
==== Path Parameters
`feed_id` (required)::
(string) Identifier for the {dfeed}
===== Query Parameters
`force`::
(boolean) Use to forcefully delete a started {dfeed}; this method is quicker than
stopping and deleting the {dfeed}.
===== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see {xpack-ref}/security-privileges.html[Security Privileges].
//<<privileges-list-cluster>>.
==== Examples
The following example deletes the `datafeed-it-ops` {dfeed}:
[source,js]
--------------------------------------------------
DELETE _xpack/ml/datafeeds/datafeed-it-ops
--------------------------------------------------
// CONSOLE
// TEST[skip:todo]
When the {dfeed} is deleted, you receive the following results:
[source,js]
----
{
"acknowledged": true
}
----