get-dfanalytics.asciidoc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. Retrieves configuration information for {dfanalytics-jobs}.
  10. experimental[]
  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. If the {es} {security-features} are enabled, you must have the following privileges:
  20. * cluster: `monitor_ml`
  21. For more information, see <<security-privileges>> and <<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. [[ml-get-dfanalytics-path-params]]
  27. ==== {api-path-parms-title}
  28. `<data_frame_analytics_id>`::
  29. (Optional, string)
  30. include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-default]
  31. +
  32. --
  33. You can get information for all {dfanalytics-jobs} by using _all, by specifying
  34. `*` as the `<data_frame_analytics_id>`, or by omitting the
  35. `<data_frame_analytics_id>`.
  36. --
  37. [[ml-get-dfanalytics-query-params]]
  38. ==== {api-query-parms-title}
  39. `allow_no_match`::
  40. (Optional, boolean)
  41. include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-match]
  42. `from`::
  43. (Optional, integer)
  44. include::{docdir}/ml/ml-shared.asciidoc[tag=from]
  45. `size`::
  46. (Optional, integer)
  47. include::{docdir}/ml/ml-shared.asciidoc[tag=size]
  48. [[ml-get-dfanalytics-results]]
  49. ==== {api-response-body-title}
  50. `data_frame_analytics`::
  51. (array)
  52. include::{docdir}/ml/ml-shared.asciidoc[tag=data-frame-analytics]
  53. [[ml-get-dfanalytics-response-codes]]
  54. ==== {api-response-codes-title}
  55. `404` (Missing resources)::
  56. If `allow_no_match` is `false`, this code indicates that there are no
  57. resources that match the request or only partial matches for the request.
  58. [[ml-get-dfanalytics-example]]
  59. ==== {api-examples-title}
  60. The following example gets configuration information for the `loganalytics`
  61. {dfanalytics-job}:
  62. [source,console]
  63. --------------------------------------------------
  64. GET _ml/data_frame/analytics/loganalytics
  65. --------------------------------------------------
  66. // TEST[skip:TBD]
  67. The API returns the following results:
  68. [source,console-result]
  69. ----
  70. {
  71. "count": 1,
  72. "data_frame_analytics": [
  73. {
  74. "id": "loganalytics",
  75. "source": {
  76. "index": "logdata",
  77. "query": {
  78. "match_all": {}
  79. }
  80. },
  81. "dest": {
  82. "index": "logdata_out",
  83. "results_field": "ml"
  84. },
  85. "analysis": {
  86. "outlier_detection": {}
  87. },
  88. "model_memory_limit": "1gb",
  89. "create_time": 1562265491319,
  90. "version" : "8.0.0"
  91. }
  92. ]
  93. }
  94. ----