get-dfanalytics.asciidoc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[get-dfanalytics]]
  4. === Get {dfanalytics-jobs} API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Get {dfanalytics-jobs}</titleabbrev>
  8. ++++
  9. experimental[]
  10. Retrieves configuration information for {dfanalytics-jobs}.
  11. [[ml-get-dfanalytics-request]]
  12. ==== {api-request-title}
  13. `GET _ml/data_frame/analytics/<data_frame_analytics_id>` +
  14. `GET _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>` +
  15. `GET _ml/data_frame/analytics/` +
  16. `GET _ml/data_frame/analytics/_all`
  17. [[ml-get-dfanalytics-prereq]]
  18. ==== {api-prereq-title}
  19. * You must have `monitor_ml` privilege to use this API. For more
  20. information, see {stack-ov}/security-privileges.html[Security privileges] and
  21. {stack-ov}/built-in-roles.html[Built-in roles].
  22. [[ml-get-dfanalytics-desc]]
  23. ==== {api-description-title}
  24. You can get information for multiple {dfanalytics-jobs} in a single API request
  25. by using a comma-separated list of {dfanalytics-jobs} or a wildcard expression.
  26. You can get information for all {dfanalytics-jobs} by using _all, by specifying
  27. `*` as the `<data_frame_analytics_id>`, or by omitting the
  28. `<data_frame_analytics_id>`.
  29. [[ml-get-dfanalytics-path-params]]
  30. ==== {api-path-parms-title}
  31. `<data_frame_analytics_id>` (Optional)::
  32. (string) Identifier for the {dfanalytics-job}. If you do not specify one of
  33. these options, the API returns information for the first hundred
  34. {dfanalytics-jobs}.
  35. `allow_no_match` (Optional)::
  36. (boolean) If `false` and the `data_frame_analytics_id` does not match any
  37. {dfanalytics-job} an error will be returned. The default value is `true`.
  38. [[ml-get-dfanalytics-query-params]]
  39. ==== {api-query-parms-title}
  40. `allow_no_match` (Optional)::
  41. (boolean) If `false` and the `data_frame_analytics_id` does not match any
  42. {dfanalytics-job} an error will be returned. The default value is `true`.
  43. `from` (Optional)::
  44. (integer) Skips the specified number of {dfanalytics-jobs}. The default value
  45. is `0`.
  46. `size` (Optional)::
  47. (integer) Specifies the maximum number of {dfanalytics-jobs} to obtain. The
  48. default value is `100`.
  49. [[ml-get-dfanalytics-results]]
  50. ==== {api-response-body-title}
  51. `data_frame_analytics`::
  52. (array) An array of {dfanalytics-job} resources. For more information, see
  53. <<ml-dfanalytics-resources>>.
  54. [[ml-get-dfanalytics-example]]
  55. ==== {api-examples-title}
  56. The following example gets configuration information for the `loganalytics`
  57. {dfanalytics-job}:
  58. [source,js]
  59. --------------------------------------------------
  60. GET _ml/data_frame/analytics/loganalytics
  61. --------------------------------------------------
  62. // CONSOLE
  63. // TEST[skip:TBD]
  64. The API returns the following results:
  65. [source,js]
  66. ----
  67. {
  68. "count": 1,
  69. "data_frame_analytics": [
  70. {
  71. "id": "loganalytics",
  72. "source": {
  73. "index": "logdata",
  74. "query": {
  75. "match_all": {}
  76. }
  77. },
  78. "dest": {
  79. "index": "logdata_out",
  80. "results_field": "ml"
  81. },
  82. "analysis": {
  83. "outlier_detection": {}
  84. },
  85. "model_memory_limit": "1gb",
  86. "create_time": 1562265491319,
  87. "version" : "8.0.0"
  88. }
  89. ]
  90. }
  91. ----
  92. // TESTRESPONSE