diff --git a/docs/reference/data-frames/apis/get-transform-stats.asciidoc b/docs/reference/data-frames/apis/get-transform-stats.asciidoc new file mode 100644 index 00000000000..f377f3d510c --- /dev/null +++ b/docs/reference/data-frames/apis/get-transform-stats.asciidoc @@ -0,0 +1,88 @@ +[role="xpack"] +[testenv="basic"] +[[get-data-frame-transform-stats]] +=== Get {dataframe-transform} statistics API +++++ +Get {dataframe-transform} statistics +++++ + +Retrieves usage information for {dataframe-transforms}. + + +==== Request + + +`GET _data_frame/transforms//_stats` + +`GET _data_frame/transforms/,/_stats` + + +`GET _data_frame/transforms/_stats` + + +`GET _data_frame/transforms/_all/_stats` + + +`GET _data_frame/transforms/*/_stats` + + +//===== Description + +==== Path Parameters + +`data_frame_transform_id`:: + (string) Identifier for the {dataframe-transform}. It can be a + {dataframe-transform} identifier or a wildcard expression. If you do not + specify one of these options, the API returns information for all + {dataframe-transforms}. + + +==== Results + +The API returns the following information: + +`transforms`:: + (array) An array of statistics objects for {dataframe-transforms}. + +//==== Authorization + +==== Examples + +The following example gets usage information for the `ecommerce_transform` +{dataframe-transform}: + +[source,js] +-------------------------------------------------- +GET _data_frame/transforms/ecommerce_transform/_stats +-------------------------------------------------- +// CONSOLE +// TEST[skip:todo] + +The API returns the following results: +[source,js] +---- +{ + "count" : 1, + "transforms" : [ + { + "id" : "ecommerce_transform", + "state" : { + "transform_state" : "started", + "current_position" : { + "customer_id" : "9" + }, + "generation" : 1 + }, + "stats" : { + "pages_processed" : 0, + "documents_processed" : 0, + "documents_indexed" : 0, + "trigger_count" : 0, + "index_time_in_ms" : 0, + "index_total" : 0, + "index_failures" : 0, + "search_time_in_ms" : 0, + "search_total" : 0, + "search_failures" : 0 + } + } + ] +} +---- +// TESTRESPONSE \ No newline at end of file diff --git a/docs/reference/data-frames/apis/get-transform.asciidoc b/docs/reference/data-frames/apis/get-transform.asciidoc new file mode 100644 index 00000000000..6c0252ff4ad --- /dev/null +++ b/docs/reference/data-frames/apis/get-transform.asciidoc @@ -0,0 +1,102 @@ +[role="xpack"] +[testenv="basic"] +[[get-data-frame-transform]] +=== Get {dataframe-transforms} API +++++ +Get {dataframe-transforms} +++++ + +Retrieves configuration information for {dataframe-transforms}. + + +==== Request + +`GET _data_frame/transforms/` + + +`GET _data_frame/transforms/,` + + +`GET _data_frame/transforms/` + + +`GET _data_frame/transforms/_all` + + +`GET _data_frame/transforms/*` + +//===== Description + +==== Path Parameters + +`data_frame_transform_id`:: + (string) Identifier for the {dataframe-transform}. It can be a + {dataframe-transform} identifier or a wildcard expression. If you do not + specify one of these options, the API returns information for all + {dataframe-transforms}. + +//// +==== Request Body + + `page`:: + `from`::: + (integer) Skips the specified number of {dataframe-transforms}. The + default value is `0`. + + `size`::: + (integer) Specifies the maximum number of {dataframe-transforms} to obtain. + The default value is `100`. +//// + +==== Results + +The API returns the following information: + +`transforms`:: + (array) An array of transform resources. + +//==== Authorization + +==== Examples + +The following example gets configuration information for the +`ecommerce_transform` {dataframe-transform}: + +[source,js] +-------------------------------------------------- +GET _data_frame/transforms/ecommerce_transform +-------------------------------------------------- +// CONSOLE +// TEST[skip:setup kibana sample data] + +The API returns the following results: +[source,js] +---- +{ + "count" : 1, + "transforms" : [ + { + "id" : "ecommerce_transform", + "source" : "kibana_sample_data_ecommerce", + "dest" : "kibana_sample_data_ecommerce_transform", + "query" : { + "match_all" : { } + }, + "pivot" : { + "group_by" : { + "customer_id" : { + "terms" : { + "field" : "customer_id" + } + } + }, + "aggregations" : { + "max_price" : { + "max" : { + "field" : "taxful_total_price" + } + } + } + } + } + ] +} + +---- +// TESTRESPONSE diff --git a/docs/reference/data-frames/apis/index.asciidoc b/docs/reference/data-frames/apis/index.asciidoc index 92c8dded4b5..428c696a38c 100644 --- a/docs/reference/data-frames/apis/index.asciidoc +++ b/docs/reference/data-frames/apis/index.asciidoc @@ -7,7 +7,12 @@ [[data-frame-transform-apis]] === {dataframe-transforms-cap} +* <>, +<> * <> +//GET +include::get-transform.asciidoc[] +include::get-transform-stats.asciidoc[] //PREVIEW include::preview-data-frame-transform.asciidoc[] diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform.json index 094ee1a0237..5bf6dd25fb5 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform.json @@ -1,6 +1,6 @@ { "data_frame.get_data_frame_transform": { - "documentation": "TODO", + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform.html", "methods": [ "GET" ], "url": { "path": "/_data_frame/transforms/{transform_id}", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform_stats.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform_stats.json index 7af9f1f80b8..6b4529650dd 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform_stats.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.get_data_frame_transform_stats.json @@ -1,6 +1,6 @@ { "data_frame.get_data_frame_transform_stats": { - "documentation": "TODO", + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform-stats.html", "methods": [ "GET" ], "url": { "path": "/_data_frame/transforms/{transform_id}/_stats",