diff --git a/docs/reference/data-frames/apis/index.asciidoc b/docs/reference/data-frames/apis/index.asciidoc index ff09b75c6d444..a75f44e995158 100644 --- a/docs/reference/data-frames/apis/index.asciidoc +++ b/docs/reference/data-frames/apis/index.asciidoc @@ -10,9 +10,9 @@ * <> * <>, <> -* <> * <>, <> +* <>, <> //CREATE include::put-transform.asciidoc[] @@ -22,4 +22,8 @@ include::delete-transform.asciidoc[] include::get-transform.asciidoc[] include::get-transform-stats.asciidoc[] //PREVIEW -include::preview-data-frame-transform.asciidoc[] +include::preview-transform.asciidoc[] +//START +include::start-transform.asciidoc[] +//STOP +include::stop-transform.asciidoc[] diff --git a/docs/reference/data-frames/apis/preview-data-frame-transform.asciidoc b/docs/reference/data-frames/apis/preview-transform.asciidoc similarity index 100% rename from docs/reference/data-frames/apis/preview-data-frame-transform.asciidoc rename to docs/reference/data-frames/apis/preview-transform.asciidoc diff --git a/docs/reference/data-frames/apis/start-transform.asciidoc b/docs/reference/data-frames/apis/start-transform.asciidoc new file mode 100644 index 0000000000000..bed0680df7416 --- /dev/null +++ b/docs/reference/data-frames/apis/start-transform.asciidoc @@ -0,0 +1,45 @@ +[role="xpack"] +[testenv="basic"] +[[start-data-frame-transform]] +=== Start {dataframe-transforms} API +++++ +Start {dataframe-transforms} +++++ + +Starts one or more {dataframe-transforms}. + +==== Request + +`POST _data_frame/transforms//_start` + +//==== Description + +==== Path Parameters + +`data_frame_transform_id` (required):: + (string) Identifier for the {dataframe-transform}. This identifier can contain + lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It + must start and end with alphanumeric characters. + +//==== Request Body +//==== Authorization + +==== Examples + +The following example starts the `ecommerce_transform` {dataframe-transform}: + +[source,js] +-------------------------------------------------- +POST _data_frame/transforms/ecommerce_transform/_start +-------------------------------------------------- +// CONSOLE +// TEST[skip:set up kibana samples] + +When the {dataframe-transform} starts, you receive the following results: +[source,js] +---- +{ + "started" : true +} +---- +// TESTRESPONSE diff --git a/docs/reference/data-frames/apis/stop-transform.asciidoc b/docs/reference/data-frames/apis/stop-transform.asciidoc new file mode 100644 index 0000000000000..179646ddb47ba --- /dev/null +++ b/docs/reference/data-frames/apis/stop-transform.asciidoc @@ -0,0 +1,57 @@ +[role="xpack"] +[testenv="basic"] +[[stop-data-frame-transform]] +=== Stop {dataframe-transforms} API +++++ +Stop {dataframe-transforms} +++++ + +Stops one or more {dataframe-transforms}. + +==== Request + +`POST _data_frame/transforms//_stop` + +//==== Description + +==== Path Parameters + +`data_frame_transform_id` (required):: + (string) Identifier for the {dataframe-transform}. This identifier can contain + lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It + must start and end with alphanumeric characters. + +==== Query Parameters + +`wait_for_completion`:: + (boolean) If set to true, causes the API to block until the indexer state completely stops. If set to false, the API returns immediately and the indexer will be stopped asynchronously in the background. Defaults to `false`. + + `timeout`:: + (time value) If `wait_for_completion=true`, the API blocks for (at maximum) + the specified duration while waiting for the job to stop. If more than + `timeout` time has passed, the API throws a timeout exception. Even if a + timeout exception is thrown, the stop request is still processing and + eventually moves the job to `STOPPED`. The timeout simply means the API call itself timed out while waiting for the status change. Defaults to `30s` + +//==== Request Body +//==== Authorization + +==== Examples + +The following example stops the `ecommerce_transform` {dataframe-transform}: + +[source,js] +-------------------------------------------------- +POST _data_frame/transforms/ecommerce_transform/_stop +-------------------------------------------------- +// CONSOLE +// TEST[skip:set up kibana samples] + +When the {dataframe-transform} stops, you receive the following results: +[source,js] +---- +{ + "stopped" : true +} +---- +// TESTRESPONSE diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.start_data_frame_transform.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.start_data_frame_transform.json index f1cb5b1e9d9b8..f2dd8e529f47d 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.start_data_frame_transform.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.start_data_frame_transform.json @@ -1,6 +1,6 @@ { "data_frame.start_data_frame_transform": { - "documentation": "TODO", + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/start-data-frame-transform.html", "methods": [ "POST" ], "url": { "path": "/_data_frame/transforms/{transform_id}/_start", diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.stop_data_frame_transform.json b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.stop_data_frame_transform.json index 9d64ba7082aaf..f4f548b9aa0eb 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.stop_data_frame_transform.json +++ b/x-pack/plugin/src/test/resources/rest-api-spec/api/data_frame.stop_data_frame_transform.json @@ -1,6 +1,6 @@ { "data_frame.stop_data_frame_transform": { - "documentation": "TODO", + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-data-frame-transform.html", "methods": [ "POST" ], "url": { "path": "/_data_frame/transforms/{transform_id}/_stop",