get-transform.asciidoc 4.0 KB

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