stop-datafeed.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. [[ml-stop-datafeed-request]]
  11. == {api-request-title}
  12. `POST _ml/datafeeds/<feed_id>/_stop` +
  13. `POST _ml/datafeeds/<feed_id>,<feed_id>/_stop` +
  14. `POST _ml/datafeeds/_all/_stop`
  15. [[ml-stop-datafeed-prereqs]]
  16. == {api-prereq-title}
  17. * If the {es} {security-features} are enabled, you must have `manage_ml` or
  18. `manage` cluster privileges to use this API. See
  19. <<security-privileges>> and {ml-docs-setup-privileges}.
  20. [[ml-stop-datafeed-desc]]
  21. == {api-description-title}
  22. A {dfeed} that is stopped ceases to retrieve data from {es}.
  23. A {dfeed} can be started and stopped multiple times throughout its lifecycle.
  24. You can stop multiple {dfeeds} in a single API request by using a
  25. comma-separated list of {dfeeds} or a wildcard expression. You can close all
  26. {dfeeds} by using `_all` or by specifying `*` as the `<feed_id>`.
  27. [[ml-stop-datafeed-path-parms]]
  28. == {api-path-parms-title}
  29. `<feed_id>`::
  30. (Required, string)
  31. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=datafeed-id-wildcard]
  32. [[ml-stop-datafeed-query-parms]]
  33. == {api-query-parms-title}
  34. `allow_no_datafeeds`::
  35. (Optional, boolean)
  36. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-datafeeds]
  37. [[ml-stop-datafeed-request-body]]
  38. == {api-request-body-title}
  39. `force`::
  40. (Optional, boolean) If true, the {dfeed} is stopped forcefully.
  41. `timeout`::
  42. (Optional, time) Controls the amount of time to wait until a {dfeed} stops.
  43. The default value is 20 seconds.
  44. [[ml-stop-datafeed-response-codes]]
  45. == {api-response-codes-title}
  46. `404` (Missing resources)::
  47. If `allow_no_datafeeds` 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. ----