2019-07-05 07:34:05 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="platinum"]
|
|
|
|
[[get-dfanalytics]]
|
|
|
|
=== Get {dfanalytics-jobs} API
|
|
|
|
[subs="attributes"]
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get {dfanalytics-jobs}</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Retrieves configuration information for {dfanalytics-jobs}.
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
experimental[]
|
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/<data_frame_analytics_id>` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/_all`
|
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-prereq]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
2020-01-09 04:44:07 -05:00
|
|
|
If the {es} {security-features} are enabled, you must have the following privileges:
|
|
|
|
|
|
|
|
* cluster: `monitor_ml`
|
|
|
|
|
|
|
|
For more information, see <<security-privileges>> and <<built-in-roles>>.
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
[[ml-get-dfanalytics-desc]]
|
|
|
|
==== {api-description-title}
|
|
|
|
|
|
|
|
You can get information for multiple {dfanalytics-jobs} in a single API request
|
2019-07-26 05:39:59 -04:00
|
|
|
by using a comma-separated list of {dfanalytics-jobs} or a wildcard expression.
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`<data_frame_analytics_id>`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, string)
|
|
|
|
include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-default]
|
|
|
|
+
|
|
|
|
--
|
|
|
|
You can get information for all {dfanalytics-jobs} by using _all, by specifying
|
|
|
|
`*` as the `<data_frame_analytics_id>`, or by omitting the
|
|
|
|
`<data_frame_analytics_id>`.
|
|
|
|
--
|
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
[[ml-get-dfanalytics-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`allow_no_match`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, boolean)
|
|
|
|
include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-match]
|
2019-07-10 20:58:17 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`from`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, integer)
|
|
|
|
include::{docdir}/ml/ml-shared.asciidoc[tag=from]
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`size`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, integer)
|
|
|
|
include::{docdir}/ml/ml-shared.asciidoc[tag=size]
|
|
|
|
|
|
|
|
|
2019-07-11 12:05:05 -04:00
|
|
|
[[ml-get-dfanalytics-results]]
|
|
|
|
==== {api-response-body-title}
|
|
|
|
|
|
|
|
`data_frame_analytics`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(array)
|
|
|
|
include::{docdir}/ml/ml-shared.asciidoc[tag=data-frame-analytics]
|
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-26 05:39:59 -04:00
|
|
|
[[ml-get-dfanalytics-response-codes]]
|
|
|
|
==== {api-response-codes-title}
|
|
|
|
|
|
|
|
`404` (Missing resources)::
|
|
|
|
If `allow_no_match` is `false`, this code indicates that there are no
|
|
|
|
resources that match the request or only partial matches for the request.
|
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-example]]
|
|
|
|
==== {api-examples-title}
|
|
|
|
|
|
|
|
The following example gets configuration information for the `loganalytics`
|
|
|
|
{dfanalytics-job}:
|
|
|
|
|
2019-09-09 12:35:50 -04:00
|
|
|
[source,console]
|
2019-07-05 07:34:05 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
GET _ml/data_frame/analytics/loganalytics
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:TBD]
|
|
|
|
|
|
|
|
The API returns the following results:
|
|
|
|
|
2019-09-06 09:22:08 -04:00
|
|
|
[source,console-result]
|
2019-07-05 07:34:05 -04:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"count": 1,
|
|
|
|
"data_frame_analytics": [
|
|
|
|
{
|
|
|
|
"id": "loganalytics",
|
|
|
|
"source": {
|
|
|
|
"index": "logdata",
|
|
|
|
"query": {
|
|
|
|
"match_all": {}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"dest": {
|
|
|
|
"index": "logdata_out",
|
|
|
|
"results_field": "ml"
|
|
|
|
},
|
|
|
|
"analysis": {
|
|
|
|
"outlier_detection": {}
|
|
|
|
},
|
|
|
|
"model_memory_limit": "1gb",
|
|
|
|
"create_time": 1562265491319,
|
|
|
|
"version" : "8.0.0"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|