get-transform.asciidoc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. [[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_transform` {transform}:
  72. [source,console]
  73. --------------------------------------------------
  74. GET _transform/ecommerce_transform
  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_transform",
  85. "source" : {
  86. "index" : [
  87. "kibana_sample_data_ecommerce"
  88. ],
  89. "query" : {
  90. "term" : {
  91. "geoip.continent_name" : {
  92. "value" : "Asia"
  93. }
  94. }
  95. }
  96. },
  97. "dest" : {
  98. "index" : "kibana_sample_data_ecommerce_transform"
  99. },
  100. "frequency": "1m",
  101. "pivot" : {
  102. "group_by" : {
  103. "customer_id" : {
  104. "terms" : {
  105. "field" : "customer_id"
  106. }
  107. }
  108. },
  109. "aggregations" : {
  110. "max_price" : {
  111. "max" : {
  112. "field" : "taxful_total_price"
  113. }
  114. }
  115. }
  116. },
  117. "description" : "Maximum priced ecommerce data by customer_id in Asia",
  118. "settings" : { },
  119. "version" : "7.5.0",
  120. "create_time" : 1576094542936
  121. }
  122. ]
  123. }
  124. ----