start-transform.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[start-transform]]
  4. === Start {transform} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Start {transform}</titleabbrev>
  8. ++++
  9. Starts one or more {transforms}.
  10. [[start-transform-request]]
  11. ==== {api-request-title}
  12. `POST _transform/<transform_id>/_start`
  13. [[start-transform-prereqs]]
  14. ==== {api-prereq-title}
  15. * If the {es} {security-features} are enabled, you must have `manage_transform`
  16. cluster privileges to use this API. You must also have `view_index_metadata`
  17. privileges on the source index for the {transform}. For more information, see
  18. <<security-privileges>> and <<built-in-roles>>.
  19. [[start-transform-desc]]
  20. ==== {api-description-title}
  21. When you start a {transform}, it creates the destination index if it
  22. does not already exist. The `number_of_shards` is set to `1` and the
  23. `auto_expand_replicas` is set to `0-1`.
  24. The {transform} deduces the mapping definitions from the source indices. For
  25. scripted fields, it uses <<dynamic-mapping,dynamic mappings>>. If a field in the
  26. destination index is created by `scripted_metric` or `bucket_script`
  27. aggregations, the {transform} uses dynamic mappings unless a template exists or
  28. the destination index already exists. Mapping definitions in the destination
  29. index take precedence over dynamic mappings and templates.
  30. When the {transform} starts, a series of validations occur to ensure
  31. its success. If you deferred validation when you created the
  32. {transform}, they occur when you start the {transform}--with the
  33. exception of privilege checks. When {es} {security-features} are enabled, the
  34. {transform} remembers which roles the user that created it had at the
  35. time of creation and uses those same roles. If those roles do not have the
  36. required privileges on the source and destination indices, the
  37. {transform} fails when it attempts unauthorized operations.
  38. [[start-transform-path-parms]]
  39. ==== {api-path-parms-title}
  40. `<transform_id>`::
  41. (Required, string)
  42. include::{docdir}/rest-api/common-parms.asciidoc[tag=transform-id]
  43. [[start-transform-example]]
  44. ==== {api-examples-title}
  45. [source,console]
  46. --------------------------------------------------
  47. POST _transform/ecommerce_transform/_start
  48. --------------------------------------------------
  49. // TEST[skip:set up kibana samples]
  50. When the {transform} starts, you receive the following results:
  51. [source,console-result]
  52. ----
  53. {
  54. "acknowledged" : true
  55. }
  56. ----