get-transform.asciidoc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. [[get-transform]]
  2. = Get {transforms} API
  3. [subs="attributes"]
  4. ++++
  5. <titleabbrev>Get {transforms}</titleabbrev>
  6. ++++
  7. Retrieves configuration information for {transforms}.
  8. [[get-transform-request]]
  9. == {api-request-title}
  10. `GET _transform/<transform_id>` +
  11. `GET _transform/<transform_id>,<transform_id>` +
  12. `GET _transform/` +
  13. `GET _transform/_all` +
  14. `GET _transform/*`
  15. [[get-transform-prereqs]]
  16. == {api-prereq-title}
  17. Requires the `monitor_transform` cluster privilege. This privilege is included
  18. in the `transform_user` built-in role.
  19. [[get-transform-desc]]
  20. == {api-description-title}
  21. You can get information for multiple {transforms} in a single API
  22. request by using a comma-separated list of identifiers or a wildcard expression.
  23. You can get information for all {transforms} by using `_all`, by
  24. specifying `*` as the `<transform_id>`, or by omitting the `<transform_id>`.
  25. [[get-transform-path-parms]]
  26. == {api-path-parms-title}
  27. `<transform_id>`::
  28. (Optional, string)
  29. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=transform-id-wildcard]
  30. [[get-transform-query-parms]]
  31. == {api-query-parms-title}
  32. `allow_no_match`::
  33. (Optional, Boolean)
  34. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-match-transforms1]
  35. `exclude_generated`::
  36. (Optional, Boolean)
  37. Excludes fields that were automatically added when creating the transform.
  38. This allows the configuration to be in an acceptable format to be retrieved
  39. and then added to another cluster. Default is false.
  40. `from`::
  41. (Optional, integer)
  42. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=from-transforms]
  43. `size`::
  44. (Optional, integer)
  45. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=size-transforms]
  46. [[get-transform-response]]
  47. == {api-response-body-title}
  48. The API returns an array of {transform} resources, which are sorted by the `id`
  49. value in ascending order. For the full list of properties, see
  50. <<put-transform-request-body,Create {transform} API>>.
  51. `create_time`::
  52. (string) The time the {transform} was created. For example, `1576094542936`.
  53. This property is informational; you cannot change its value.
  54. `version`::
  55. (string) The version of {es} that existed on the node when the {transform} was
  56. created.
  57. [[get-transform-response-codes]]
  58. == {api-response-codes-title}
  59. `404` (Missing resources)::
  60. If `allow_no_match` is `false`, this code indicates that there are no
  61. resources that match the request or only partial matches for the request.
  62. [[get-transform-example]]
  63. == {api-examples-title}
  64. The following example retrieves information about a maximum of ten {transforms}:
  65. [source,console]
  66. --------------------------------------------------
  67. GET _transform?size=10
  68. --------------------------------------------------
  69. // TEST[skip:setup kibana sample data]
  70. The following example gets configuration information for the
  71. `ecommerce_transform1` {transform}:
  72. [source,console]
  73. --------------------------------------------------
  74. GET _transform/ecommerce_transform1
  75. --------------------------------------------------
  76. // TEST[skip:setup kibana sample data]
  77. The API returns the following results:
  78. [source,console-result]
  79. ----
  80. {
  81. "count" : 1,
  82. "transforms" : [
  83. {
  84. "id" : "ecommerce_transform1",
  85. "authorization" : {
  86. "roles" : [
  87. "superuser"
  88. ]
  89. },
  90. "version" : "8.4.0",
  91. "create_time" : 1656023416565,
  92. "source" : {
  93. "index" : [
  94. "kibana_sample_data_ecommerce"
  95. ],
  96. "query" : {
  97. "term" : {
  98. "geoip.continent_name" : {
  99. "value" : "Asia"
  100. }
  101. }
  102. }
  103. },
  104. "dest" : {
  105. "index" : "kibana_sample_data_ecommerce_transform1",
  106. "pipeline" : "add_timestamp_pipeline"
  107. },
  108. "frequency" : "5m",
  109. "sync" : {
  110. "time" : {
  111. "field" : "order_date",
  112. "delay" : "60s"
  113. }
  114. },
  115. "pivot" : {
  116. "group_by" : {
  117. "customer_id" : {
  118. "terms" : {
  119. "field" : "customer_id"
  120. }
  121. }
  122. },
  123. "aggregations" : {
  124. "max_price" : {
  125. "max" : {
  126. "field" : "taxful_total_price"
  127. }
  128. }
  129. }
  130. },
  131. "description" : "Maximum priced ecommerce data by customer_id in Asia",
  132. "settings" : { },
  133. "retention_policy" : {
  134. "time" : {
  135. "field" : "order_date",
  136. "max_age" : "30d"
  137. }
  138. }
  139. }
  140. ]
  141. }
  142. ----