get-dfanalytics.asciidoc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. [[ml-get-dfanalytics-query-params]]
  36. ==== {api-query-parms-title}
  37. `allow_no_match` (Optional)::
  38. (boolean) If `false` and the `data_frame_analytics_id` does not match any
  39. {dfanalytics-job} an error will be returned. The default value is `true`.
  40. `from` (Optional)::
  41. (integer) Skips the specified number of {dfanalytics-jobs}. The default value
  42. is `0`.
  43. `size` (Optional)::
  44. (integer) Specifies the maximum number of {dfanalytics-jobs} to obtain. The
  45. default value is `100`.
  46. [[ml-get-dfanalytics-example]]
  47. ==== {api-examples-title}
  48. The following example gets configuration information for the `loganalytics`
  49. {dfanalytics-job}:
  50. [source,js]
  51. --------------------------------------------------
  52. GET _ml/data_frame/analytics/loganalytics
  53. --------------------------------------------------
  54. // CONSOLE
  55. // TEST[skip:TBD]
  56. The API returns the following results:
  57. [source,js]
  58. ----
  59. {
  60. "count": 1,
  61. "data_frame_analytics": [
  62. {
  63. "id": "loganalytics",
  64. "source": {
  65. "index": "logdata",
  66. "query": {
  67. "match_all": {}
  68. }
  69. },
  70. "dest": {
  71. "index": "logdata_out",
  72. "results_field": "ml"
  73. },
  74. "analysis": {
  75. "outlier_detection": {}
  76. },
  77. "model_memory_limit": "1gb",
  78. "create_time": 1562265491319,
  79. "version" : "8.0.0"
  80. }
  81. ]
  82. }
  83. ----
  84. // TESTRESPONSE