get-transform.asciidoc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. Retrieves configuration information for {dataframe-transforms}.
  10. beta[]
  11. [[get-data-frame-transform-request]]
  12. ==== {api-request-title}
  13. `GET _data_frame/transforms/<data_frame_transform_id>` +
  14. `GET _data_frame/transforms/<data_frame_transform_id>,<data_frame_transform_id>` +
  15. `GET _data_frame/transforms/` +
  16. `GET _data_frame/transforms/_all` +
  17. `GET _data_frame/transforms/*`
  18. [[get-data-frame-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-data-frame-transform-desc]]
  26. ==== {api-description-title}
  27. You can get information for multiple {dataframe-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 {dataframe-transforms} by using `_all`, by
  30. specifying `*` as the `<data_frame_transform_id>`, or by omitting the
  31. `<data_frame_transform_id>`.
  32. [[get-data-frame-transform-path-parms]]
  33. ==== {api-path-parms-title}
  34. `<data_frame_transform_id>`::
  35. (Optional, string) Identifier for the {dataframe-transform}. It can be a
  36. {dataframe-transform} identifier or a wildcard expression. If you do not
  37. specify one of these options, the API returns information for all
  38. {dataframe-transforms}.
  39. [[get-data-frame-transform-query-parms]]
  40. ==== {api-query-parms-title}
  41. `allow_no_match`::
  42. (Optional, boolean) Specifies what to do when the request:
  43. +
  44. --
  45. * Contains wildcard expressions and there are no {dataframe-transforms} that match.
  46. * Contains the `_all` string or no identifiers and there are no matches.
  47. * Contains wildcard expressions and there are only partial matches.
  48. The default value is `true`, which returns an empty `transforms` array when
  49. there are no matches and the subset of results when there are partial matches.
  50. If this parameter is `false`, the request returns a `404` status code when there
  51. are no matches or only partial matches.
  52. --
  53. `from`::
  54. (Optional, integer) Skips the specified number of {dataframe-transforms}. The
  55. default value is `0`.
  56. `size`::
  57. (Optional, integer) Specifies the maximum number of {dataframe-transforms} to obtain. The default value is `100`.
  58. [[get-data-frame-transform-response]]
  59. ==== {api-response-body-title}
  60. `transforms`::
  61. (array) An array of transform resources, which are sorted by the `id` value in
  62. ascending order. See <<data-frame-transform-resource>>.
  63. [[get-data-frame-transform-response-codes]]
  64. ==== {api-response-codes-title}
  65. `404` (Missing resources)::
  66. If `allow_no_match` is `false`, this code indicates that there are no
  67. resources that match the request or only partial matches for the request.
  68. [[get-data-frame-transform-example]]
  69. ==== {api-examples-title}
  70. The following example retrieves information about a maximum of ten transforms:
  71. [source,js]
  72. --------------------------------------------------
  73. GET _data_frame/transforms?size=10
  74. --------------------------------------------------
  75. // CONSOLE
  76. // TEST[skip:setup kibana sample data]
  77. The following example gets configuration information for the
  78. `ecommerce_transform` {dataframe-transform}:
  79. [source,js]
  80. --------------------------------------------------
  81. GET _data_frame/transforms/ecommerce_transform
  82. --------------------------------------------------
  83. // CONSOLE
  84. // TEST[skip:setup kibana sample data]
  85. The API returns the following results:
  86. [source,console-result]
  87. ----
  88. {
  89. "count" : 1,
  90. "transforms" : [
  91. {
  92. "id" : "ecommerce_transform",
  93. "source" : {
  94. "index" : [
  95. "kibana_sample_data_ecommerce"
  96. ],
  97. "query" : {
  98. "term" : {
  99. "geoip.continent_name" : {
  100. "value" : "Asia"
  101. }
  102. }
  103. }
  104. },
  105. "dest" : {
  106. "index" : "kibana_sample_data_ecommerce_transform"
  107. },
  108. "frequency": "1m",
  109. "pivot" : {
  110. "group_by" : {
  111. "customer_id" : {
  112. "terms" : {
  113. "field" : "customer_id"
  114. }
  115. }
  116. },
  117. "aggregations" : {
  118. "max_price" : {
  119. "max" : {
  120. "field" : "taxful_total_price"
  121. }
  122. }
  123. }
  124. },
  125. "description" : "Maximum priced ecommerce data by customer_id in Asia"
  126. }
  127. ]
  128. }
  129. ----