get-dfanalytics.asciidoc 3.0 KB

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