stop-dfanalytics.asciidoc 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[stop-dfanalytics]]
  4. === Stop {dfanalytics-jobs} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Stop {dfanalytics-jobs}</titleabbrev>
  8. ++++
  9. Stops one or more {dfanalytics-jobs}.
  10. experimental[]
  11. [[ml-stop-dfanalytics-request]]
  12. ==== {api-request-title}
  13. `POST _ml/data_frame/analytics/<data_frame_analytics_id>/_stop` +
  14. `POST _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>/_stop` +
  15. `POST _ml/data_frame/analytics/_all/_stop`
  16. [[ml-stop-dfanalytics-prereq]]
  17. ==== {api-prereq-title}
  18. * You must have `machine_learning_admin` built-in role to use this API. For more
  19. information, see <<security-privileges>> and <<built-in-roles>>.
  20. [[ml-stop-dfanalytics-desc]]
  21. ==== {api-description-title}
  22. A {dfanalytics-job} can be started and stopped multiple times throughout its
  23. lifecycle.
  24. You can stop multiple {dfanalytics-jobs} in a single API request by using a
  25. comma-separated list of {dfanalytics-jobs} or a wildcard expression. You can
  26. stop all {dfanalytics-job} by using _all or by specifying * as the
  27. <data_frame_analytics_id>.
  28. [[ml-stop-dfanalytics-path-params]]
  29. ==== {api-path-parms-title}
  30. `<data_frame_analytics_id>`::
  31. (Required, string)
  32. include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-define]
  33. [[ml-stop-dfanalytics-query-params]]
  34. ==== {api-query-parms-title}
  35. `allow_no_match`::
  36. (Optional, boolean)
  37. include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-match]
  38. `force`::
  39. (Optional, boolean) If true, the {dfanalytics-job} is stopped forcefully.
  40. `timeout`::
  41. (Optional, <<time-units,time units>>)
  42. include::{docdir}/ml/ml-shared.asciidoc[tag=timeout-stop]
  43. [[ml-stop-dfanalytics-example]]
  44. ==== {api-examples-title}
  45. The following example stops the `loganalytics` {dfanalytics-job}:
  46. [source,console]
  47. --------------------------------------------------
  48. POST _ml/data_frame/analytics/loganalytics/_stop
  49. --------------------------------------------------
  50. // TEST[skip:TBD]
  51. When the {dfanalytics-job} stops, you receive the following results:
  52. [source,console-result]
  53. ----
  54. {
  55. "stopped" : true
  56. }
  57. ----