get-ml-info.asciidoc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[get-ml-info]]
  4. = Get machine learning info API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Get {ml} info</titleabbrev>
  8. ++++
  9. Returns defaults and limits used by machine learning.
  10. [[get-ml-info-request]]
  11. == {api-request-title}
  12. `GET _ml/info`
  13. [[get-ml-info-prereqs]]
  14. == {api-prereq-title}
  15. * If the {es} {security-features} are enabled, you must have `monitor_ml`,
  16. `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. The
  17. `machine_learning_admin` and `machine_learning_user` roles provide these
  18. privileges. See <<security-privileges>>, <<built-in-roles>> and
  19. {ml-docs-setup-privileges}.
  20. [[get-ml-info-desc]]
  21. == {api-description-title}
  22. This endpoint is designed to be used by a user interface that needs to fully
  23. understand machine learning configurations where some options are not specified,
  24. meaning that the defaults should be used. This endpoint may be used to find out
  25. what those defaults are.
  26. [[get-ml-info-example]]
  27. == {api-examples-title}
  28. The endpoint takes no arguments:
  29. [source,console]
  30. --------------------------------------------------
  31. GET _ml/info
  32. --------------------------------------------------
  33. // TEST
  34. This is a possible response:
  35. [source,console-result]
  36. ----
  37. {
  38. "defaults" : {
  39. "anomaly_detectors" : {
  40. "categorization_analyzer" : {
  41. "tokenizer" : "ml_classic",
  42. "filter" : [
  43. {
  44. "type" : "stop",
  45. "stopwords" : [
  46. "Monday",
  47. "Tuesday",
  48. "Wednesday",
  49. "Thursday",
  50. "Friday",
  51. "Saturday",
  52. "Sunday",
  53. "Mon",
  54. "Tue",
  55. "Wed",
  56. "Thu",
  57. "Fri",
  58. "Sat",
  59. "Sun",
  60. "January",
  61. "February",
  62. "March",
  63. "April",
  64. "May",
  65. "June",
  66. "July",
  67. "August",
  68. "September",
  69. "October",
  70. "November",
  71. "December",
  72. "Jan",
  73. "Feb",
  74. "Mar",
  75. "Apr",
  76. "May",
  77. "Jun",
  78. "Jul",
  79. "Aug",
  80. "Sep",
  81. "Oct",
  82. "Nov",
  83. "Dec",
  84. "GMT",
  85. "UTC"
  86. ]
  87. }
  88. ]
  89. },
  90. "model_memory_limit" : "1gb",
  91. "categorization_examples_limit" : 4,
  92. "model_snapshot_retention_days" : 10,
  93. "daily_model_snapshot_retention_after_days" : 1
  94. },
  95. "datafeeds" : {
  96. "scroll_size" : 1000
  97. }
  98. },
  99. "upgrade_mode": false,
  100. "native_code" : {
  101. "version": "7.0.0",
  102. "build_hash": "99a07c016d5a73"
  103. },
  104. "limits" : {
  105. "effective_max_model_memory_limit": "28961mb"
  106. }
  107. }
  108. ----
  109. // TESTRESPONSE[s/"upgrade_mode": false/"upgrade_mode": $body.upgrade_mode/]
  110. // TESTRESPONSE[s/"version": "7.0.0",/"version": "$body.native_code.version",/]
  111. // TESTRESPONSE[s/"build_hash": "99a07c016d5a73"/"build_hash": "$body.native_code.build_hash"/]
  112. // TESTRESPONSE[s/"effective_max_model_memory_limit": "28961mb"/"effective_max_model_memory_limit": "$body.limits.effective_max_model_memory_limit"/]