get-transform.asciidoc 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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-path-parms]]
  29. ==== {api-path-parms-title}
  30. `<data_frame_transform_id>` (Optional)::
  31. (string) Identifier for the {dataframe-transform}. It can be a
  32. {dataframe-transform} identifier or a wildcard expression. If you do not
  33. specify one of these options, the API returns information for all
  34. {dataframe-transforms}.
  35. [discrete]
  36. [[get-data-frame-transform-query-parms]]
  37. ==== {api-query-parms-title}
  38. `allow_no_match` (Optional)::
  39. (boolean) Whether to ignore if a wildcard expression matches no
  40. {dataframe-transforms}. This includes `_all` string or when no transforms have
  41. been specified. The default is `true`.
  42. `from` (Optional)::
  43. (integer) Skips the specified number of {dataframe-transforms}. The
  44. default value is `0`.
  45. `size` (Optional)::
  46. (integer) Specifies the maximum number of {dataframe-transforms} to obtain.
  47. The default value is `100`.
  48. [discrete]
  49. [[get-data-frame-transform-response]]
  50. ==== {api-response-body-title}
  51. `transforms`::
  52. (array) An array of transform resources, which are sorted by the `id` value in
  53. ascending order.
  54. [discrete]
  55. [[get-data-frame-transform-example]]
  56. ==== {api-example-title}
  57. The following example retrieves information about a maximum of ten transforms:
  58. [source,js]
  59. --------------------------------------------------
  60. GET _data_frame/transforms?size=10
  61. --------------------------------------------------
  62. // CONSOLE
  63. // TEST[skip:setup kibana sample data]
  64. The following example gets configuration information for the
  65. `ecommerce_transform` {dataframe-transform}:
  66. [source,js]
  67. --------------------------------------------------
  68. GET _data_frame/transforms/ecommerce_transform
  69. --------------------------------------------------
  70. // CONSOLE
  71. // TEST[skip:setup kibana sample data]
  72. The API returns the following results:
  73. [source,js]
  74. ----
  75. {
  76. "count" : 1,
  77. "transforms" : [
  78. {
  79. "id" : "ecommerce_transform",
  80. "source" : {
  81. "index" : [
  82. "kibana_sample_data_ecommerce"
  83. ],
  84. "query" : {
  85. "term" : {
  86. "geoip.continent_name" : {
  87. "value" : "Asia"
  88. }
  89. }
  90. }
  91. },
  92. "dest" : {
  93. "index" : "kibana_sample_data_ecommerce_transform"
  94. },
  95. "pivot" : {
  96. "group_by" : {
  97. "customer_id" : {
  98. "terms" : {
  99. "field" : "customer_id"
  100. }
  101. }
  102. },
  103. "aggregations" : {
  104. "max_price" : {
  105. "max" : {
  106. "field" : "taxful_total_price"
  107. }
  108. }
  109. }
  110. },
  111. "description" : "Maximum priced ecommerce data by customer_id in Asia"
  112. }
  113. ]
  114. }
  115. ----
  116. // TESTRESPONSE