stop-datafeed.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. [role="xpack"]
  2. [[ml-stop-datafeed]]
  3. = Stop {dfeeds} API
  4. [subs="attributes"]
  5. ++++
  6. <titleabbrev>Stop {dfeeds}</titleabbrev>
  7. ++++
  8. Stops one or more {dfeeds}.
  9. [[ml-stop-datafeed-request]]
  10. == {api-request-title}
  11. `POST _ml/datafeeds/<feed_id>/_stop` +
  12. `POST _ml/datafeeds/<feed_id>,<feed_id>/_stop` +
  13. `POST _ml/datafeeds/_all/_stop`
  14. [[ml-stop-datafeed-prereqs]]
  15. == {api-prereq-title}
  16. Requires the `manage_ml` cluster privilege. This privilege is included in the
  17. `machine_learning_admin` built-in role.
  18. [[ml-stop-datafeed-desc]]
  19. == {api-description-title}
  20. A {dfeed} that is stopped ceases to retrieve data from {es}.
  21. A {dfeed} can be started and stopped multiple times throughout its lifecycle.
  22. [[ml-stop-datafeed-path-parms]]
  23. == {api-path-parms-title}
  24. `<feed_id>`::
  25. (Required, string)
  26. Identifier for the datafeed. You can stop multiple {dfeeds} in a single API
  27. request by using a comma-separated list of {dfeeds} or a wildcard expression.
  28. You can close all {dfeeds} by using `_all` or by specifying `*` as the
  29. identifier.
  30. [[ml-stop-datafeed-query-parms]]
  31. == {api-query-parms-title}
  32. `allow_no_match`::
  33. (Optional, Boolean)
  34. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-match-datafeeds]
  35. `force`::
  36. (Optional, Boolean) If true, the {dfeed} is stopped forcefully.
  37. `timeout`::
  38. (Optional, time) Specifies the amount of time to wait until a {dfeed} stops.
  39. The default value is 20 seconds.
  40. [[ml-stop-datafeed-request-body]]
  41. == {api-request-body-title}
  42. You can also specify the query parameters (such as `allow_no_match` and
  43. `force`) in the request body.
  44. [[ml-stop-datafeed-response-codes]]
  45. == {api-response-codes-title}
  46. `404` (Missing resources)::
  47. If `allow_no_match` is `false`, this code indicates that there are no
  48. resources that match the request or only partial matches for the request.
  49. [[ml-stop-datafeed-example]]
  50. == {api-examples-title}
  51. [source,console]
  52. --------------------------------------------------
  53. POST _ml/datafeeds/datafeed-low_request_rate/_stop
  54. {
  55. "timeout": "30s"
  56. }
  57. --------------------------------------------------
  58. // TEST[skip:Kibana sample data]
  59. When the {dfeed} stops, you receive the following results:
  60. [source,console-result]
  61. ----
  62. {
  63. "stopped": true
  64. }
  65. ----