2017-06-19 18:23:58 -07:00
|
|
|
[role="xpack"]
|
2018-08-31 16:49:24 -07:00
|
|
|
[testenv="platinum"]
|
2017-04-04 15:26:39 -07:00
|
|
|
[[ml-stop-datafeed]]
|
2017-12-14 10:52:49 -08:00
|
|
|
=== Stop {dfeeds-cap} API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Stop {dfeeds-cap}</titleabbrev>
|
|
|
|
++++
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2018-06-13 13:37:35 -07:00
|
|
|
Stops one or more {dfeeds}.
|
2017-08-09 08:30:21 -07:00
|
|
|
|
2017-05-02 12:45:42 -07:00
|
|
|
A {dfeed} that is stopped ceases to retrieve data from {es}.
|
|
|
|
A {dfeed} can be started and stopped multiple times throughout its lifecycle.
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-06-06 13:42:47 -07:00
|
|
|
==== Request
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-08-09 08:30:21 -07:00
|
|
|
`POST _xpack/ml/datafeeds/<feed_id>/_stop` +
|
|
|
|
|
|
|
|
`POST _xpack/ml/datafeeds/<feed_id>,<feed_id>/_stop` +
|
|
|
|
|
|
|
|
`POST _xpack/ml/datafeeds/_all/_stop`
|
|
|
|
|
|
|
|
|
|
|
|
===== Description
|
|
|
|
|
|
|
|
You can stop multiple {dfeeds} in a single API request by using a
|
|
|
|
comma-separated list of {dfeeds} or a wildcard expression. You can close all
|
|
|
|
{dfeeds} by using `_all` or by specifying `*` as the `<feed_id>`.
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-04-18 15:13:21 -07:00
|
|
|
|
2017-06-06 13:42:47 -07:00
|
|
|
==== Path Parameters
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-08-09 08:30:21 -07:00
|
|
|
`feed_id`::
|
|
|
|
(string) Identifier for the {dfeed}. It can be a {dfeed} identifier or a
|
|
|
|
wildcard expression.
|
|
|
|
|
2017-04-10 08:59:27 -07:00
|
|
|
|
2017-06-06 13:42:47 -07:00
|
|
|
==== Request Body
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-04-10 08:59:27 -07:00
|
|
|
`force`::
|
2017-05-02 12:45:42 -07:00
|
|
|
(boolean) If true, the {dfeed} is stopped forcefully.
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-04-10 08:59:27 -07:00
|
|
|
`timeout`::
|
2017-05-02 12:45:42 -07:00
|
|
|
(time) Controls the amount of time to wait until a {dfeed} stops.
|
2017-04-10 08:59:27 -07:00
|
|
|
The default value is 20 seconds.
|
2017-04-04 15:26:39 -07:00
|
|
|
|
|
|
|
|
2017-06-06 13:42:47 -07:00
|
|
|
==== Authorization
|
2017-04-25 14:08:29 -07:00
|
|
|
|
|
|
|
You must have `manage_ml`, or `manage` cluster privileges to use this API.
|
2017-06-19 18:23:58 -07:00
|
|
|
For more information, see
|
|
|
|
{xpack-ref}/security-privileges.html[Security Privileges].
|
2017-08-09 08:30:21 -07:00
|
|
|
|
2017-04-25 14:08:29 -07:00
|
|
|
|
2017-06-06 13:42:47 -07:00
|
|
|
==== Examples
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-11-27 10:15:46 -08:00
|
|
|
The following example stops the `datafeed-total-requests` {dfeed}:
|
2017-04-04 15:26:39 -07:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-11-27 10:15:46 -08:00
|
|
|
POST _xpack/ml/datafeeds/datafeed-total-requests/_stop
|
2017-04-10 08:59:27 -07:00
|
|
|
{
|
|
|
|
"timeout": "30s"
|
|
|
|
}
|
2017-04-04 15:26:39 -07:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
2018-08-31 16:49:24 -07:00
|
|
|
// TEST[skip:setup:server_metrics_startdf]
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2017-05-02 12:45:42 -07:00
|
|
|
When the {dfeed} stops, you receive the following results:
|
2018-08-31 16:49:24 -07:00
|
|
|
|
2017-04-21 11:23:27 -04:00
|
|
|
[source,js]
|
2017-04-04 15:26:39 -07:00
|
|
|
----
|
|
|
|
{
|
2017-04-10 08:59:27 -07:00
|
|
|
"stopped": true
|
2017-04-04 15:26:39 -07:00
|
|
|
}
|
|
|
|
----
|
2018-08-31 16:49:24 -07:00
|
|
|
// TESTRESPONSE
|