1
0

start-dfanalytics.asciidoc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. * source indices: `read`, `view_index_metadata`
  20. * destination index: `read`, `create_index`, `manage` and `index`
  21. For more information, see <<built-in-roles>>, <<security-privileges>>, and
  22. {ml-docs-setup-privileges}.
  23. [[ml-start-dfanalytics-desc]]
  24. == {api-description-title}
  25. A {dfanalytics-job} can be started and stopped multiple times throughout its
  26. lifecycle.
  27. If the destination index does not exist, it is created automatically the first
  28. time you start the {dfanalytics-job}. The `index.number_of_shards` and
  29. `index.number_of_replicas` settings for the destination index are copied from
  30. the source index. If there are multiple source indices, the destination index
  31. copies the highest setting values. The mappings for the destination index are
  32. also copied from the source indices. If there are any mapping conflicts, the job
  33. fails to start.
  34. If the destination index exists, it is used as is. You can therefore set up the
  35. destination index in advance with custom settings and mappings.
  36. IMPORTANT: When {es} {security-features} are enabled, the {dfanalytics-job}
  37. remembers which user created it and runs the job using those credentials. If you
  38. provided <<http-clients-secondary-authorization,secondary authorization headers>>
  39. when you created the job, those credentials are used.
  40. [[ml-start-dfanalytics-path-params]]
  41. == {api-path-parms-title}
  42. `<data_frame_analytics_id>`::
  43. (Required, string)
  44. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-define]
  45. [[ml-start-dfanalytics-query-params]]
  46. == {api-query-parms-title}
  47. `timeout`::
  48. (Optional, <<time-units,time units>>)
  49. include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=timeout-start]
  50. [[ml-start-dfanalytics-response-body]]
  51. == {api-response-body-title}
  52. `acknowledged`::
  53. (boolean) For a successful response, this value is always `true`. On failure, an
  54. exception is returned instead.
  55. `node`::
  56. (string) The ID of the node that the job was started on.
  57. If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.
  58. [[ml-start-dfanalytics-example]]
  59. == {api-examples-title}
  60. The following example starts the `loganalytics` {dfanalytics-job}:
  61. [source,console]
  62. --------------------------------------------------
  63. POST _ml/data_frame/analytics/loganalytics/_start
  64. --------------------------------------------------
  65. // TEST[skip:setup:logdata_job]
  66. When the {dfanalytics-job} starts, you receive the following results:
  67. [source,console-result]
  68. ----
  69. {
  70. "acknowledged" : true,
  71. "node" : "node-1"
  72. }
  73. ----