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]]
|
2018-12-20 10:23:28 -08:00
|
|
|
=== Stop {dfeeds} API
|
2019-04-30 13:46:13 -04:00
|
|
|
|
|
|
|
[subs="attributes"]
|
2017-12-14 10:52:49 -08:00
|
|
|
++++
|
2018-12-20 10:23:28 -08:00
|
|
|
<titleabbrev>Stop {dfeeds}</titleabbrev>
|
2017-12-14 10:52:49 -08:00
|
|
|
++++
|
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
|
|
|
|
2019-06-27 09:42:47 -07:00
|
|
|
[[ml-stop-datafeed-request]]
|
|
|
|
==== {api-request-title}
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2018-12-07 20:34:11 +00:00
|
|
|
`POST _ml/datafeeds/<feed_id>/_stop` +
|
2017-08-09 08:30:21 -07:00
|
|
|
|
2018-12-07 20:34:11 +00:00
|
|
|
`POST _ml/datafeeds/<feed_id>,<feed_id>/_stop` +
|
2017-08-09 08:30:21 -07:00
|
|
|
|
2018-12-07 20:34:11 +00:00
|
|
|
`POST _ml/datafeeds/_all/_stop`
|
2017-08-09 08:30:21 -07:00
|
|
|
|
2019-06-27 13:58:42 -07:00
|
|
|
[[ml-stop-datafeed-prereqs]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
* If the {es} {security-features} are enabled, you must have `manage_ml` or
|
|
|
|
`manage` cluster privileges to use this API. See
|
2019-10-07 15:23:19 -07:00
|
|
|
<<security-privileges>>.
|
2019-06-27 13:58:42 -07:00
|
|
|
|
2019-06-27 09:42:47 -07:00
|
|
|
[[ml-stop-datafeed-desc]]
|
|
|
|
==== {api-description-title}
|
2017-08-09 08:30:21 -07:00
|
|
|
|
2019-06-27 13:58: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-08-09 08:30:21 -07:00
|
|
|
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
|
|
|
|
2019-06-27 09:42:47 -07:00
|
|
|
[[ml-stop-datafeed-path-parms]]
|
|
|
|
==== {api-path-parms-title}
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2019-07-12 08:26:31 -07:00
|
|
|
`<feed_id>`::
|
|
|
|
(Required, string) Identifier for the {dfeed}. It can be a {dfeed} identifier
|
|
|
|
or a wildcard expression.
|
2017-08-09 08:30:21 -07:00
|
|
|
|
2019-07-25 16:45:06 +02:00
|
|
|
[[ml-stop-datafeed-query-parms]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
|
|
|
`allow_no_datafeeds`::
|
|
|
|
(Optional, boolean) Specifies what to do when the request:
|
|
|
|
+
|
|
|
|
--
|
|
|
|
* Contains wildcard expressions and there are no {datafeeds} that match.
|
|
|
|
* Contains the `_all` string or no identifiers and there are no matches.
|
|
|
|
* Contains wildcard expressions and there are only partial matches.
|
|
|
|
|
|
|
|
The default value is `true`, which returns an empty `datafeeds` array when
|
|
|
|
there are no matches and the subset of results when there are partial matches.
|
|
|
|
If this parameter is `false`, the request returns a `404` status code when there
|
|
|
|
are no matches or only partial matches.
|
|
|
|
--
|
|
|
|
|
2019-06-27 09:42:47 -07:00
|
|
|
[[ml-stop-datafeed-request-body]]
|
|
|
|
==== {api-request-body-title}
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2019-07-12 08:26:31 -07:00
|
|
|
`force`::
|
|
|
|
(Optional, boolean) If true, the {dfeed} is stopped forcefully.
|
2017-04-04 15:26:39 -07:00
|
|
|
|
2019-07-12 08:26:31 -07:00
|
|
|
`timeout`::
|
|
|
|
(Optional, 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
|
|
|
|
2019-07-25 16:45:06 +02:00
|
|
|
[[ml-stop-datafeed-response-codes]]
|
|
|
|
==== {api-response-codes-title}
|
|
|
|
|
|
|
|
`404` (Missing resources)::
|
|
|
|
If `allow_no_datafeeds` is `false`, this code indicates that there are no
|
|
|
|
resources that match the request or only partial matches for the request.
|
|
|
|
|
2019-06-27 09:42:47 -07:00
|
|
|
[[ml-stop-datafeed-example]]
|
|
|
|
==== {api-examples-title}
|
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
|
|
|
|
2019-09-09 12:35:50 -04:00
|
|
|
[source,console]
|
2017-04-04 15:26:39 -07:00
|
|
|
--------------------------------------------------
|
2018-12-07 20:34:11 +00:00
|
|
|
POST _ml/datafeeds/datafeed-total-requests/_stop
|
2017-04-10 08:59:27 -07:00
|
|
|
{
|
|
|
|
"timeout": "30s"
|
|
|
|
}
|
2017-04-04 15:26:39 -07:00
|
|
|
--------------------------------------------------
|
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
|
|
|
|
2019-09-06 09:22:08 -04:00
|
|
|
[source,console-result]
|
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
|
|
|
}
|
|
|
|
----
|