start-dfanalytics.asciidoc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[start-dfanalytics]]
  4. === Start {dfanalytics-jobs} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Start {dfanalytics-jobs}</titleabbrev>
  8. ++++
  9. Starts a {dfanalytics-job}.
  10. experimental[]
  11. [[ml-start-dfanalytics-request]]
  12. ==== {api-request-title}
  13. `POST _ml/data_frame/analytics/<data_frame_analytics_id>/_start`
  14. [[ml-start-dfanalytics-prereq]]
  15. ==== {api-prereq-title}
  16. If the {es} {security-features} are enabled, you must have the following
  17. built-in roles and privileges:
  18. * `machine_learning_admin`
  19. * `kibana_admin` (UI only)
  20. * source indices: `read`, `view_index_metadata`
  21. * destination index: `read`, `create_index`, `manage` and `index`
  22. * cluster: `monitor` (UI only)
  23. For more information, see <<security-privileges>> and <<built-in-roles>>.
  24. [[ml-start-dfanalytics-desc]]
  25. ==== {api-description-title}
  26. A {dfanalytics-job} can be started and stopped multiple times throughout its
  27. lifecycle.
  28. If the destination index does not exist, it is created automatically the first
  29. time you start the {dfanalytics-job}. The `index.number_of_shards` and
  30. `index.number_of_replicas` settings for the destination index are copied from
  31. the source index. If there are multiple source indices, the destination index
  32. copies the highest setting values. The mappings for the destination index are
  33. also copied from the source indices. If there are any mapping conflicts, the job
  34. fails to start.
  35. If the destination index exists, it is used as is. You can therefore set up the
  36. destination index in advance with custom settings and mappings.
  37. [[ml-start-dfanalytics-path-params]]
  38. ==== {api-path-parms-title}
  39. `<data_frame_analytics_id>`::
  40. (Required, string)
  41. include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-define]
  42. [[ml-start-dfanalytics-query-params]]
  43. ==== {api-query-parms-title}
  44. `timeout`::
  45. (Optional, <<time-units,time units>>)
  46. include::{docdir}/ml/ml-shared.asciidoc[tag=timeout-start]
  47. [[ml-start-dfanalytics-example]]
  48. ==== {api-examples-title}
  49. The following example starts the `loganalytics` {dfanalytics-job}:
  50. [source,console]
  51. --------------------------------------------------
  52. POST _ml/data_frame/analytics/loganalytics/_start
  53. --------------------------------------------------
  54. // TEST[skip:setup:logdata_job]
  55. When the {dfanalytics-job} starts, you receive the following results:
  56. [source,console-result]
  57. ----
  58. {
  59. "acknowledged" : true
  60. }
  61. ----