2017-04-04 18:26:39 -04:00
|
|
|
[[ml-stop-datafeed]]
|
|
|
|
==== Stop Data Feeds
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
A data feed that is stopped ceases to retrieve data from {es}.
|
2017-04-04 18:26:39 -04:00
|
|
|
A data feed can be opened and closed multiple times throughout its lifecycle.
|
|
|
|
|
|
|
|
===== Request
|
|
|
|
|
|
|
|
`POST _xpack/ml/datafeeds/<feed_id>/_stop`
|
|
|
|
|
|
|
|
////
|
|
|
|
===== Description
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
TBD
|
2017-04-04 18:26:39 -04:00
|
|
|
////
|
|
|
|
===== Path Parameters
|
|
|
|
|
|
|
|
`feed_id` (required)::
|
2017-04-10 11:59:27 -04:00
|
|
|
(+string+) Identifier for the data feed
|
|
|
|
|
|
|
|
===== Request Body
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
`force`::
|
|
|
|
(+boolean+) If true, the data feed is stopped forcefully.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
`timeout`::
|
|
|
|
(+time+) Controls the amount of time to wait until a data feed stops.
|
|
|
|
The default value is 20 seconds.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
////
|
2017-04-04 18:26:39 -04:00
|
|
|
===== 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)
|
2017-04-10 11:59:27 -04:00
|
|
|
////
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Examples
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
The following example stops the `datafeed-it-ops-kpi` data feed:
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-04-10 11:59:27 -04:00
|
|
|
POST _xpack/ml/datafeeds/datafeed-it-ops-kpi/_stop
|
|
|
|
{
|
|
|
|
"timeout": "30s"
|
|
|
|
}
|
2017-04-04 18:26:39 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
When the data feed stops, you receive the following results:
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
2017-04-10 11:59:27 -04:00
|
|
|
"stopped": true
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
----
|