elasticsearch/docs/java-rest/high-level/ml/get-data-frame-analytics.asciidoc
Benjamin Trent 7bd6e78dae
[ML] adding for_export flag for ml plugin GET resource APIs (#63092)
This adds the new `for_export` flag to the following APIs:

- GET _ml/anomaly_detection/<job_id>
- GET _ml/datafeeds/<datafeed_id>
- GET _ml/data_frame/analytics/<analytics_id>

The flag is designed for cloning or exporting configuration objects to later be put into the same cluster or a separate cluster. 

The following fields are not returned in the objects:

- any field that is not user settable (e.g. version, create_time)
- any field that is a calculated default value (e.g. datafeed chunking_config)
- any field that would effectively require changing to be of use (e.g. datafeed job_id)
- any field that is automatically set via another Elastic stack process (e.g. anomaly job custom_settings.created_by)


closes https://github.com/elastic/elasticsearch/issues/63055
2020-10-02 08:29:19 -04:00

38 lines
1.3 KiB
Text

--
:api: get-data-frame-analytics
:request: GetDataFrameAnalyticsRequest
:response: GetDataFrameAnalyticsResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Get {dfanalytics-jobs} API
Retrieves one or more {dfanalytics-jobs}.
The API accepts a +{request}+ object and returns a +{response}+.
[id="{upid}-{api}-request"]
==== Get {dfanalytics-jobs} request
A +{request}+ requires either a {dfanalytics-job} ID, a comma-separated list of
IDs, or the special wildcard `_all` to get all {dfanalytics-jobs}.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> Constructing a new GET request referencing an existing {dfanalytics-job}
<2> Optional boolean value for requesting the {dfanalytics-job} in a format that can
then be put into another cluster. Certain fields that can only be set when
the {dfanalytics-job} is created are removed.
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Response
The returned +{response}+ contains the requested {dfanalytics-jobs}.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------