stop-datafeed.asciidoc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. ==== Request
  13. `POST _ml/datafeeds/<feed_id>/_stop` +
  14. `POST _ml/datafeeds/<feed_id>,<feed_id>/_stop` +
  15. `POST _ml/datafeeds/_all/_stop`
  16. ===== Description
  17. You can stop multiple {dfeeds} in a single API request by using a
  18. comma-separated list of {dfeeds} or a wildcard expression. You can close all
  19. {dfeeds} by using `_all` or by specifying `*` as the `<feed_id>`.
  20. ==== Path Parameters
  21. `feed_id`::
  22. (string) Identifier for the {dfeed}. It can be a {dfeed} identifier or a
  23. wildcard expression.
  24. ==== Request Body
  25. `force`::
  26. (boolean) If true, the {dfeed} is stopped forcefully.
  27. `timeout`::
  28. (time) Controls the amount of time to wait until a {dfeed} stops.
  29. The default value is 20 seconds.
  30. ==== Authorization
  31. You must have `manage_ml`, or `manage` cluster privileges to use this API.
  32. For more information, see
  33. {xpack-ref}/security-privileges.html[Security Privileges].
  34. ==== Examples
  35. The following example stops the `datafeed-total-requests` {dfeed}:
  36. [source,js]
  37. --------------------------------------------------
  38. POST _ml/datafeeds/datafeed-total-requests/_stop
  39. {
  40. "timeout": "30s"
  41. }
  42. --------------------------------------------------
  43. // CONSOLE
  44. // TEST[skip:setup:server_metrics_startdf]
  45. When the {dfeed} stops, you receive the following results:
  46. [source,js]
  47. ----
  48. {
  49. "stopped": true
  50. }
  51. ----
  52. // TESTRESPONSE