get-transform.asciidoc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. beta[]
  11. [[get-transform-request]]
  12. ==== {api-request-title}
  13. `GET _data_frame/transforms/<transform_id>` +
  14. `GET _data_frame/transforms/<transform_id>,<transform_id>` +
  15. `GET _data_frame/transforms/` +
  16. `GET _data_frame/transforms/_all` +
  17. `GET _data_frame/transforms/*`
  18. [[get-transform-prereqs]]
  19. ==== {api-prereq-title}
  20. * If the {es} {security-features} are enabled, you must have
  21. `monitor_data_frame_transforms` cluster privileges to use this API. The built-in
  22. `data_frame_transforms_user` role has these privileges. For more information,
  23. see {stack-ov}/security-privileges.html[Security privileges] and
  24. {stack-ov}/built-in-roles.html[Built-in roles].
  25. [[get-transform-desc]]
  26. ==== {api-description-title}
  27. You can get information for multiple {transforms} in a single API
  28. request by using a comma-separated list of identifiers or a wildcard expression.
  29. You can get information for all {transforms} by using `_all`, by
  30. specifying `*` as the `<transform_id>`, or by omitting the `<transform_id>`.
  31. [[get-transform-path-parms]]
  32. ==== {api-path-parms-title}
  33. `<transform_id>`::
  34. (Optional, string) Identifier for the {transform}. It can be a
  35. {transform} identifier or a wildcard expression. If you do not
  36. specify one of these options, the API returns information for all
  37. {transforms}.
  38. [[get-transform-query-parms]]
  39. ==== {api-query-parms-title}
  40. `allow_no_match`::
  41. (Optional, boolean) Specifies what to do when the request:
  42. +
  43. --
  44. * Contains wildcard expressions and there are no {transforms} that match.
  45. * Contains the `_all` string or no identifiers and there are no matches.
  46. * Contains wildcard expressions and there are only partial matches.
  47. The default value is `true`, which returns an empty `transforms` array when
  48. there are no matches and the subset of results when there are partial matches.
  49. If this parameter is `false`, the request returns a `404` status code when there
  50. are no matches or only partial matches.
  51. --
  52. `from`::
  53. (Optional, integer) Skips the specified number of {transforms}. The
  54. default value is `0`.
  55. `size`::
  56. (Optional, integer) Specifies the maximum number of {transforms} to obtain. The default value is `100`.
  57. [[get-transform-response]]
  58. ==== {api-response-body-title}
  59. `transforms`::
  60. (array) An array of {transform} resources, which are sorted by the `id` value in
  61. ascending order. See <<transform-resource>>.
  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 _data_frame/transforms?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 _data_frame/transforms/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. }
  124. ]
  125. }
  126. ----