2019-07-05 07:34:05 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="platinum"]
|
|
|
|
[[get-dfanalytics-stats]]
|
|
|
|
=== Get {dfanalytics-jobs} statistics API
|
|
|
|
[subs="attributes"]
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get {dfanalytics-jobs} stats</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Retrieves usage information for {dfanalytics-jobs}.
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
experimental[]
|
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-stats-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/<data_frame_analytics_id>/_stats` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>/_stats` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/_stats` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/_all/_stats` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/*/_stats`
|
|
|
|
|
|
|
|
[[ml-get-dfanalytics-stats-prereq]]
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
* You must have `monitor_ml` privilege to use this API. For more
|
|
|
|
information, see {stack-ov}/security-privileges.html[Security privileges] and
|
|
|
|
{stack-ov}/built-in-roles.html[Built-in roles].
|
|
|
|
|
|
|
|
[[ml-get-dfanalytics-stats-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`<data_frame_analytics_id>`::
|
|
|
|
(Optional, string)Identifier for the {dfanalytics-job}. If you do not specify
|
|
|
|
one of these options, the API returns information for the first hundred
|
2019-07-05 07:34:05 -04:00
|
|
|
{dfanalytics-jobs}.
|
|
|
|
|
|
|
|
[[ml-get-dfanalytics-stats-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`allow_no_match`::
|
2019-07-26 05:39:59 -04:00
|
|
|
(Optional, boolean) Specifies what to do when the request:
|
|
|
|
+
|
|
|
|
--
|
|
|
|
* Contains wildcard expressions and there are no {dfanalytics-jobs} that match.
|
|
|
|
* Contains the `_all` string or no identifiers and there are no matches.
|
|
|
|
* Contains wildcard expressions and there are only partial matches.
|
|
|
|
|
|
|
|
The default value is `true`, which returns an empty `data_frame_analytics` array
|
|
|
|
when there are no matches and the subset of results when there are partial
|
|
|
|
matches. If this parameter is `false`, the request returns a `404` status code
|
|
|
|
when there are no matches or only partial matches.
|
|
|
|
--
|
2019-07-10 20:58:17 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`from`::
|
|
|
|
(Optional, integer) Skips the specified number of {dfanalytics-jobs}. The
|
|
|
|
default value is `0`.
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`size`::
|
|
|
|
(Optional, integer) Specifies the maximum number of {dfanalytics-jobs} to
|
|
|
|
obtain. The default value is `100`.
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
[[ml-get-dfanalytics-stats-response-body]]
|
|
|
|
==== {api-response-body-title}
|
|
|
|
|
|
|
|
The API returns the following information:
|
|
|
|
|
|
|
|
`data_frame_analytics`::
|
|
|
|
(array) An array of statistics objects for {dfanalytics-jobs}, which are
|
|
|
|
sorted by the `id` value in ascending order.
|
|
|
|
|
2019-07-26 05:39:59 -04:00
|
|
|
[[ml-get-dfanalytics-stats-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-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-stats-example]]
|
|
|
|
==== {api-examples-title}
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET _ml/data_frame/analytics/loganalytics/_stats
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:TBD]
|
|
|
|
|
|
|
|
The API returns the following results:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
----
|
|
|
|
{
|
|
|
|
"count": 1,
|
|
|
|
"data_frame_analytics": [
|
|
|
|
{
|
|
|
|
"id": "loganalytics",
|
|
|
|
"state": "stopped"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|
|
|
|
// TESTRESPONSE
|