get-transform.asciidoc 4.1 KB

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