OpenSearch/docs/en/rest-api/ml/delete-datafeed.asciidoc
Dimitris Athanasiou 3f6e640f90 [ML] Add force delete datafeed action ()
When a user or client intend to delete a datafeed
and its job, there is benefit into ensuring the
datafeed has gracefully stopped (ie no data loss).
In constrast, the desired behaviour is to stop and
delete the datafeed as quickly as possible.

This change adds a force option to the delete
datafeed action. When the delete is forced,
the datafeed is isolated, its task removed and,
finally, the datafeed itself is removed from the
metadata.

relates 

Original commit: elastic/x-pack-elasticsearch@5ae0168bf2
2017-06-06 13:39:36 +01:00

54 lines
1.1 KiB
Plaintext

//lcawley Verified example output 2017-04-11
[[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 <<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
}
----