get-dfanalytics.asciidoc 3.0 KB

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