stop-datafeed.asciidoc 1.6 KB

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