stop-datafeed.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ml-stop-datafeed]]
  4. === Stop {dfeeds} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Stop {dfeeds}</titleabbrev>
  8. ++++
  9. Stops one or more {dfeeds}.
  10. A {dfeed} that is stopped ceases to retrieve data from {es}.
  11. A {dfeed} can be started and stopped multiple times throughout its lifecycle.
  12. [[ml-stop-datafeed-request]]
  13. ==== {api-request-title}
  14. `POST _ml/datafeeds/<feed_id>/_stop` +
  15. `POST _ml/datafeeds/<feed_id>,<feed_id>/_stop` +
  16. `POST _ml/datafeeds/_all/_stop`
  17. [[ml-stop-datafeed-desc]]
  18. ==== {api-description-title}
  19. You can stop multiple {dfeeds} in a single API request by using a
  20. comma-separated list of {dfeeds} or a wildcard expression. You can close all
  21. {dfeeds} by using `_all` or by specifying `*` as the `<feed_id>`.
  22. [[ml-stop-datafeed-path-parms]]
  23. ==== {api-path-parms-title}
  24. `feed_id`::
  25. (string) Identifier for the {dfeed}. It can be a {dfeed} identifier or a
  26. wildcard expression.
  27. [[ml-stop-datafeed-request-body]]
  28. ==== {api-request-body-title}
  29. `force`::
  30. (boolean) If true, the {dfeed} is stopped forcefully.
  31. `timeout`::
  32. (time) Controls the amount of time to wait until a {dfeed} stops.
  33. The default value is 20 seconds.
  34. [[ml-stop-datafeed-prereqs]]
  35. ==== {api-prereq-title}
  36. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  37. For more information, see
  38. {stack-ov}/security-privileges.html[Security privileges].
  39. [[ml-stop-datafeed-example]]
  40. ==== {api-examples-title}
  41. The following example stops the `datafeed-total-requests` {dfeed}:
  42. [source,js]
  43. --------------------------------------------------
  44. POST _ml/datafeeds/datafeed-total-requests/_stop
  45. {
  46. "timeout": "30s"
  47. }
  48. --------------------------------------------------
  49. // CONSOLE
  50. // TEST[skip:setup:server_metrics_startdf]
  51. When the {dfeed} stops, you receive the following results:
  52. [source,js]
  53. ----
  54. {
  55. "stopped": true
  56. }
  57. ----
  58. // TESTRESPONSE