stop-datafeed.asciidoc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. You can stop multiple {dfeeds} in a single API request by using a
  23. comma-separated list of {dfeeds} or a wildcard expression. You can close all
  24. {dfeeds} by using `_all` or by specifying `*` as the `<feed_id>`.
  25. [[ml-stop-datafeed-path-parms]]
  26. == {api-path-parms-title}
  27. `<feed_id>`::
  28. (Required, string)
  29. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id-wildcard]
  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-datafeeds]
  35. `force`::
  36. (Optional, Boolean) If true, the {dfeed} is stopped forcefully.
  37. `timeout`::
  38. (Optional, time) Controls 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. `force`::
  43. (Optional, Boolean) If true, the {dfeed} is stopped forcefully.
  44. `timeout`::
  45. (Optional, time) Controls the amount of time to wait until a {dfeed} stops.
  46. The default value is 20 seconds.
  47. [[ml-stop-datafeed-response-codes]]
  48. == {api-response-codes-title}
  49. `404` (Missing resources)::
  50. If `allow_no_match` is `false`, this code indicates that there are no
  51. resources that match the request or only partial matches for the request.
  52. [[ml-stop-datafeed-example]]
  53. == {api-examples-title}
  54. [source,console]
  55. --------------------------------------------------
  56. POST _ml/datafeeds/datafeed-low_request_rate/_stop
  57. {
  58. "timeout": "30s"
  59. }
  60. --------------------------------------------------
  61. // TEST[skip:Kibana sample data]
  62. When the {dfeed} stops, you receive the following results:
  63. [source,console-result]
  64. ----
  65. {
  66. "stopped": true
  67. }
  68. ----