From 1130edb7788172e8722633480277c78bbd89171c Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 19 Nov 2025 11:23:14 +0400 Subject: [PATCH 1/2] Add optional body to three ML APIs --- .../MlStartDataFrameAnalyticsRequest.ts | 12 +++++++ .../MlStopDataFrameAnalyticsRequest.ts | 32 +++++++++++++++++++ .../MlStopTrainedModelDeploymentRequest.ts | 20 ++++++++++++ 3 files changed, 64 insertions(+) diff --git a/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts b/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts index 17f4a901a0..29c98c2d09 100644 --- a/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts +++ b/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts @@ -66,4 +66,16 @@ export interface Request extends RequestBase { */ timeout?: Duration } + body?: { + /** + * If provided, must be the same identifier as in the path. + */ + id?: Id, + /** + * Controls the amount of time to wait until the data frame analytics job + * starts. + * @server_default 20s + */ + timeout?: Duration + } } diff --git a/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts b/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts index 8155c2ae88..2be62a84dd 100644 --- a/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts +++ b/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts @@ -76,4 +76,36 @@ export interface Request extends RequestBase { */ timeout?: Duration } + body?: { + /** + * If provided, must be the same identifier as in the path. + */ + id?: Id, + /** + * Specifies what to do when the request: + * + * 1. Contains wildcard expressions and there are no data frame analytics + * jobs that match. + * 2. Contains the _all string or no identifiers and there are no matches. + * 3. 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. + * @server_default true + */ + allow_no_match?: boolean + /** + * If true, the data frame analytics job is stopped forcefully. + * @server_default false + */ + force?: boolean + /** + * Controls the amount of time to wait until the data frame analytics job + * stops. Defaults to 20 seconds. + * @server_default 20s + */ + timeout?: Duration + } } diff --git a/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts b/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts index 7eaf0b5785..35bb14466c 100644 --- a/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts +++ b/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts @@ -59,4 +59,24 @@ export interface Request extends RequestBase { */ force?: boolean } + body?: { + /** + * If provided, must be the same identifier as in the path. + */ + id?: Id, + /** + * Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; + * contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and + * there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches. + * If `false`, the request returns a 404 status code when there are no matches or only partial matches. + * @server_default true + */ + allow_no_match?: boolean + /** + * Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you + * restart the model deployment. + * @server_default false + */ + force?: boolean + } } From de4b3439feff71c65ab0645abdbb3cece9c655e7 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 1 Dec 2025 11:02:38 +0400 Subject: [PATCH 2/2] Fix lint --- .../MlStartDataFrameAnalyticsRequest.ts | 2 +- .../MlStopDataFrameAnalyticsRequest.ts | 2 +- .../MlStopTrainedModelDeploymentRequest.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts b/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts index 29c98c2d09..b3795eccfe 100644 --- a/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts +++ b/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsRequest.ts @@ -70,7 +70,7 @@ export interface Request extends RequestBase { /** * If provided, must be the same identifier as in the path. */ - id?: Id, + id?: Id /** * Controls the amount of time to wait until the data frame analytics job * starts. diff --git a/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts b/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts index 2be62a84dd..75e8b94fd0 100644 --- a/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts +++ b/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsRequest.ts @@ -80,7 +80,7 @@ export interface Request extends RequestBase { /** * If provided, must be the same identifier as in the path. */ - id?: Id, + id?: Id /** * Specifies what to do when the request: * diff --git a/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts b/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts index 35bb14466c..614f213bb6 100644 --- a/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts +++ b/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentRequest.ts @@ -63,7 +63,7 @@ export interface Request extends RequestBase { /** * If provided, must be the same identifier as in the path. */ - id?: Id, + id?: Id /** * Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; * contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and