123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- [role="xpack"]
- [testenv="platinum"]
- [[get-dfanalytics]]
- === Get {dfanalytics-jobs} API
- [subs="attributes"]
- ++++
- <titleabbrev>Get {dfanalytics-jobs}</titleabbrev>
- ++++
- Retrieves configuration information for {dfanalytics-jobs}.
- experimental[]
- [[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`
- [[ml-get-dfanalytics-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-desc]]
- ==== {api-description-title}
- You can get information for multiple {dfanalytics-jobs} in a single API request
- by using a comma-separated list of {dfanalytics-jobs} or a wildcard expression.
- [[ml-get-dfanalytics-path-params]]
- ==== {api-path-parms-title}
- `<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
- {dfanalytics-jobs}. 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>`.
- [[ml-get-dfanalytics-query-params]]
- ==== {api-query-parms-title}
- `allow_no_match`::
- (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.
- --
- `from`::
- (Optional, integer) Skips the specified number of {dfanalytics-jobs}. The
- default value is `0`.
- `size`::
- (Optional, integer) Specifies the maximum number of {dfanalytics-jobs} to
- obtain. The default value is `100`.
-
- [[ml-get-dfanalytics-results]]
- ==== {api-response-body-title}
- `data_frame_analytics`::
- (array) An array of {dfanalytics-job} resources. For more information, see
- <<ml-dfanalytics-resources>>.
- [[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.
- [[ml-get-dfanalytics-example]]
- ==== {api-examples-title}
- The following example gets configuration information for the `loganalytics`
- {dfanalytics-job}:
- [source,js]
- --------------------------------------------------
- GET _ml/data_frame/analytics/loganalytics
- --------------------------------------------------
- // CONSOLE
- // TEST[skip:TBD]
- The API returns the following results:
- [source,js]
- ----
- {
- "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"
- }
- ]
- }
- ----
- // TESTRESPONSE
|