stop-dfanalytics.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. experimental[]
  10. Stops one or more {dfanalytics-jobs}.
  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 {stack-ov}/security-privileges.html[Security privileges] and
  20. {stack-ov}/built-in-roles.html[Built-in roles].
  21. [[ml-stop-dfanalytics-desc]]
  22. ==== {api-description-title}
  23. A {dfanalytics-job} can be started and stopped multiple times throughout its
  24. lifecycle.
  25. You can stop multiple {dfanalytics-jobs} in a single API request by using a
  26. comma-separated list of {dfanalytics-jobs} or a wildcard expression. You can
  27. stop all {dfanalytics-job} by using _all or by specifying * as the
  28. <data_frame_analytics_id>.
  29. [[ml-stop-dfanalytics-path-params]]
  30. ==== {api-path-parms-title}
  31. `<data_frame_analytics_id>` (Required)::
  32. (string) Identifier for the {dfanalytics-job}. This identifier can contain
  33. lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It
  34. must start and end with alphanumeric characters.
  35. [[ml-stop-dfanalytics--query-params]]
  36. ==== {api-query-parms-title}
  37. `allow_no_match` (Optional)::
  38. (boolean) If `false` and the `data_frame_analytics_id` does not match any
  39. {dfanalytics-job} an error will be returned. The default value is `true`.
  40. `force` (Optional)::
  41. (boolean) If true, the {dfanalytics-job} is stopped forcefully.
  42. `timeout` (Optional)::
  43. Controls the amount of time to wait until the {dfanalytics-job} stops.
  44. The default value is 20 seconds.
  45. [[ml-stop-dfanalytics-example]]
  46. ==== {api-examples-title}
  47. The following example stops the `loganalytics` {dfanalytics-job}:
  48. [source,js]
  49. --------------------------------------------------
  50. POST _ml/data_frame/analytics/loganalytics/_stop
  51. --------------------------------------------------
  52. // CONSOLE
  53. // TEST[skip:TBD]
  54. When the {dfanalytics-job} stops, you receive the following results:
  55. [source,js]
  56. ----
  57. {
  58. "stopped" : true
  59. }
  60. ----
  61. // TESTRESPONSE