get-transform.asciidoc 4.1 KB

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