OpenSearch/docs/en/rest-api/ml/stop-datafeed.asciidoc

60 lines
1.3 KiB
Plaintext
Raw Normal View History

[[ml-stop-datafeed]]
==== Stop Data Feeds
A data feed that is stopped ceases to retrieve data from {es}.
A data feed can be opened and closed multiple times throughout its lifecycle.
===== Request
`POST _xpack/ml/datafeeds/<feed_id>/_stop`
////
===== Description
TBD
////
===== Path Parameters
`feed_id` (required)::
(+string+) Identifier for the data feed
===== Request Body
`force`::
(+boolean+) If true, the data feed is stopped forcefully.
`timeout`::
(+time+) Controls the amount of time to wait until a data feed stops.
The default value is 20 seconds.
////
===== Responses
200
(EmptyResponse) The cluster has been successfully deleted
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: clusters.cluster_not_found)
412
(BasicFailedReply) The Elasticsearch cluster has not been shutdown yet (code: clusters.cluster_plan_state_error)
////
===== Examples
The following example stops the `datafeed-it-ops-kpi` data feed:
[source,js]
--------------------------------------------------
POST _xpack/ml/datafeeds/datafeed-it-ops-kpi/_stop
{
"timeout": "30s"
}
--------------------------------------------------
// CONSOLE
// TEST[skip:todo]
When the data feed stops, you receive the following results:
----
{
"stopped": true
}
----