get-transform.asciidoc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[get-data-frame-transform]]
  4. === Get {dataframe-transforms} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Get {dataframe-transforms}</titleabbrev>
  8. ++++
  9. beta[]
  10. Retrieves configuration information for {dataframe-transforms}.
  11. [discrete]
  12. [[get-data-frame-transform-request]]
  13. ==== {api-request-title}
  14. `GET _data_frame/transforms/<data_frame_transform_id>` +
  15. `GET _data_frame/transforms/<data_frame_transform_id>,<data_frame_transform_id>` +
  16. `GET _data_frame/transforms/` +
  17. `GET _data_frame/transforms/_all` +
  18. `GET _data_frame/transforms/*`
  19. [discrete]
  20. [[get-data-frame-transform-prereqs]]
  21. ==== {api-prereq-title}
  22. * If the {es} {security-features} are enabled, you must have
  23. `monitor_data_frame_transforms` cluster privileges to use this API. The built-in
  24. `data_frame_transforms_user` role has these privileges. For more information,
  25. see {stack-ov}/security-privileges.html[Security privileges] and
  26. {stack-ov}/built-in-roles.html[Built-in roles].
  27. [discrete]
  28. [[get-data-frame-transform-desc]]
  29. ==== {api-description-title}
  30. You can get information for multiple {dataframe-transforms} in a single API
  31. request by using a comma-separated list of identifiers or a wildcard expression.
  32. You can get information for all {dataframe-transforms} by using `_all`, by
  33. specifying `*` as the `<data_frame_transform_id>`, or by omitting the
  34. `<data_frame_transform_id>`.
  35. [discrete]
  36. [[get-data-frame-transform-path-parms]]
  37. ==== {api-path-parms-title}
  38. `<data_frame_transform_id>` (Optional)::
  39. (string) Identifier for the {dataframe-transform}. It can be a
  40. {dataframe-transform} identifier or a wildcard expression. If you do not
  41. specify one of these options, the API returns information for all
  42. {dataframe-transforms}.
  43. [discrete]
  44. [[get-data-frame-transform-query-parms]]
  45. ==== {api-query-parms-title}
  46. `allow_no_match` (Optional)::
  47. (boolean) Specifies what to do when the request:
  48. +
  49. --
  50. * Contains wildcard expressions and there are no {dataframe-transforms} that match.
  51. * Contains the `_all` string or no identifiers and there are no matches.
  52. * Contains wildcard expressions and there are only partial matches.
  53. The default value is `true`, which returns an empty `transforms` array when
  54. there are no matches and the subset of results when there are partial matches.
  55. If this parameter is `false`, the request returns a `404` status code when there
  56. are no matches or only partial matches.
  57. --
  58. `from` (Optional)::
  59. (integer) Skips the specified number of {dataframe-transforms}. The
  60. default value is `0`.
  61. `size` (Optional)::
  62. (integer) Specifies the maximum number of {dataframe-transforms} to obtain.
  63. The default value is `100`.
  64. [discrete]
  65. [[get-data-frame-transform-response]]
  66. ==== {api-response-body-title}
  67. `transforms`::
  68. (array) An array of transform resources, which are sorted by the `id` value in
  69. ascending order. See <<data-frame-transform-resource>>.
  70. [[get-data-frame-transform-response-codes]]
  71. ==== {api-response-codes-title}
  72. `404` (Missing resources)::
  73. If `allow_no_match` is `false`, this code indicates that there are no
  74. resources that match the request or only partial matches for the request.
  75. [discrete]
  76. [[get-data-frame-transform-example]]
  77. ==== {api-examples-title}
  78. The following example retrieves information about a maximum of ten transforms:
  79. [source,js]
  80. --------------------------------------------------
  81. GET _data_frame/transforms?size=10
  82. --------------------------------------------------
  83. // CONSOLE
  84. // TEST[skip:setup kibana sample data]
  85. The following example gets configuration information for the
  86. `ecommerce_transform` {dataframe-transform}:
  87. [source,js]
  88. --------------------------------------------------
  89. GET _data_frame/transforms/ecommerce_transform
  90. --------------------------------------------------
  91. // CONSOLE
  92. // TEST[skip:setup kibana sample data]
  93. The API returns the following results:
  94. [source,js]
  95. ----
  96. {
  97. "count" : 1,
  98. "transforms" : [
  99. {
  100. "id" : "ecommerce_transform",
  101. "source" : {
  102. "index" : [
  103. "kibana_sample_data_ecommerce"
  104. ],
  105. "query" : {
  106. "term" : {
  107. "geoip.continent_name" : {
  108. "value" : "Asia"
  109. }
  110. }
  111. }
  112. },
  113. "dest" : {
  114. "index" : "kibana_sample_data_ecommerce_transform"
  115. },
  116. "pivot" : {
  117. "group_by" : {
  118. "customer_id" : {
  119. "terms" : {
  120. "field" : "customer_id"
  121. }
  122. }
  123. },
  124. "aggregations" : {
  125. "max_price" : {
  126. "max" : {
  127. "field" : "taxful_total_price"
  128. }
  129. }
  130. }
  131. },
  132. "description" : "Maximum priced ecommerce data by customer_id in Asia"
  133. }
  134. ]
  135. }
  136. ----
  137. // TESTRESPONSE