From 3ea3aa5527039363df644e96d9cdf6733826c5bf Mon Sep 17 00:00:00 2001 From: David Roberts Date: Wed, 21 Nov 2018 12:56:44 +0000 Subject: [PATCH 1/3] [ML] Add docs for ML info endpoint This endpoint was not previously documented as it was not particularly useful to end users. However, since the HLRC will support the endpoint we need some documentation to link to. The purpose of the endpoint is to provide defaults and limits used by ML. These are needed to fully understand configurations that have missing values because the missing value means the default should be used. Relates #35777 --- docs/reference/ml/apis/ml-api.asciidoc | 8 ++++ docs/reference/ml/apis/ml-info.asciidoc | 60 +++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 docs/reference/ml/apis/ml-info.asciidoc diff --git a/docs/reference/ml/apis/ml-api.asciidoc b/docs/reference/ml/apis/ml-api.asciidoc index bb086435fb24c..e62666c9f0ba0 100644 --- a/docs/reference/ml/apis/ml-api.asciidoc +++ b/docs/reference/ml/apis/ml-api.asciidoc @@ -76,6 +76,12 @@ machine learning APIs and in advanced job configuration options in Kibana. * <> +[float] +[[ml-api-ml-info-endpoint]] +=== Info + +* <> + //ADD include::post-calendar-event.asciidoc[] include::put-calendar-job.asciidoc[] @@ -115,6 +121,8 @@ include::get-snapshot.asciidoc[] include::get-calendar-event.asciidoc[] include::get-filter.asciidoc[] include::get-record.asciidoc[] +//INFO +include::ml-info.asciidoc[] //OPEN include::open-job.asciidoc[] //POST diff --git a/docs/reference/ml/apis/ml-info.asciidoc b/docs/reference/ml/apis/ml-info.asciidoc new file mode 100644 index 0000000000000..0a7e60ca43cdd --- /dev/null +++ b/docs/reference/ml/apis/ml-info.asciidoc @@ -0,0 +1,60 @@ +[role="xpack"] +[testenv="platinum"] +[[ml-info]] +=== Machine Learning Info API +++++ +Machine Learning Info +++++ + +Returns defaults and limits used by machine learning. + +==== Request + +`GET _xpack/ml/info` + +==== Description + +This endpoint is designed to be used by a user interface that needs to fully +understand machine learning configurations where some options are not specified, +meaning that the defaults should be used. This endpoint may be used to find out +what those defaults are. + + +==== Authorization + +You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster +privileges to use this API. The `machine_learning_admin` and `machine_learning_user` +roles provide these privileges. For more information, see +{xpack-ref}/security-privileges.html[Security Privileges] and +{xpack-ref}/built-in-roles.html[Built-in Roles]. + + +==== Examples + +The endpoint takes no arguments: + +[source,js] +-------------------------------------------------- +GET _xpack/ml/info +-------------------------------------------------- +// CONSOLE +// TEST + +This is a possible response: +[source,js] +---- +{ + "defaults" : { + "anomaly_detectors" : { + "model_memory_limit" : "1gb", + "categorization_examples_limit" : 4, + "model_snapshot_retention_days" : 1 + }, + "datafeeds" : { + "scroll_size" : 1000 + } + }, + "limits" : { } +} +---- +// TESTRESPONSE From b591ee88dbb0eb856b249f320acce5f7215122d1 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Thu, 22 Nov 2018 09:16:32 +0000 Subject: [PATCH 2/3] Apply suggestions from code review Co-Authored-By: droberts195 --- docs/reference/ml/apis/ml-info.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/reference/ml/apis/ml-info.asciidoc b/docs/reference/ml/apis/ml-info.asciidoc index 0a7e60ca43cdd..09dd063c27ead 100644 --- a/docs/reference/ml/apis/ml-info.asciidoc +++ b/docs/reference/ml/apis/ml-info.asciidoc @@ -1,9 +1,9 @@ [role="xpack"] [testenv="platinum"] [[ml-info]] -=== Machine Learning Info API +=== Get Machine Learning Info API ++++ -Machine Learning Info +Get Machine Learning Info ++++ Returns defaults and limits used by machine learning. @@ -25,8 +25,8 @@ what those defaults are. You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. The `machine_learning_admin` and `machine_learning_user` roles provide these privileges. For more information, see -{xpack-ref}/security-privileges.html[Security Privileges] and -{xpack-ref}/built-in-roles.html[Built-in Roles]. +{stack-ov}/security-privileges.html[Security Privileges] and +{stack-ov}/built-in-roles.html[Built-in Roles]. ==== Examples From eb9fbe89c8a15df3eafcd9ae24905613b56d733a Mon Sep 17 00:00:00 2001 From: David Roberts Date: Thu, 22 Nov 2018 09:23:23 +0000 Subject: [PATCH 3/3] Rename page --- .../ml/apis/{ml-info.asciidoc => get-ml-info.asciidoc} | 2 +- docs/reference/ml/apis/ml-api.asciidoc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) rename docs/reference/ml/apis/{ml-info.asciidoc => get-ml-info.asciidoc} (98%) diff --git a/docs/reference/ml/apis/ml-info.asciidoc b/docs/reference/ml/apis/get-ml-info.asciidoc similarity index 98% rename from docs/reference/ml/apis/ml-info.asciidoc rename to docs/reference/ml/apis/get-ml-info.asciidoc index 09dd063c27ead..d3f9e69560bc9 100644 --- a/docs/reference/ml/apis/ml-info.asciidoc +++ b/docs/reference/ml/apis/get-ml-info.asciidoc @@ -1,6 +1,6 @@ [role="xpack"] [testenv="platinum"] -[[ml-info]] +[[get-ml-info]] === Get Machine Learning Info API ++++ Get Machine Learning Info diff --git a/docs/reference/ml/apis/ml-api.asciidoc b/docs/reference/ml/apis/ml-api.asciidoc index e62666c9f0ba0..d3d1c42d0a8e3 100644 --- a/docs/reference/ml/apis/ml-api.asciidoc +++ b/docs/reference/ml/apis/ml-api.asciidoc @@ -80,7 +80,7 @@ machine learning APIs and in advanced job configuration options in Kibana. [[ml-api-ml-info-endpoint]] === Info -* <> +* <> //ADD include::post-calendar-event.asciidoc[] @@ -117,12 +117,11 @@ include::get-datafeed-stats.asciidoc[] include::get-influencer.asciidoc[] include::get-job.asciidoc[] include::get-job-stats.asciidoc[] +include::get-ml-info.asciidoc[] include::get-snapshot.asciidoc[] include::get-calendar-event.asciidoc[] include::get-filter.asciidoc[] include::get-record.asciidoc[] -//INFO -include::ml-info.asciidoc[] //OPEN include::open-job.asciidoc[] //POST