Stop data frame analytics jobs API
Stops one or more data frame analytics jobs.
Request
POST _ml/data_frame/analytics/<data_frame_analytics_id>/_stop
POST _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>/_stop
POST _ml/data_frame/analytics/_all/_stop
Prerequisites
Requires the manage_ml cluster privilege. This privilege is included in the machine_learning_admin built-in role.
Description
A data frame analytics job can be started and stopped multiple times throughout its lifecycle.
You can stop multiple data frame analytics jobs in a single API request by using a comma-separated list of data frame analytics jobs or a wildcard expression. You can stop all data frame analytics job by using _all or by specifying * as the <data_frame_analytics_id>.
Path parameters
-
<data_frame_analytics_id> - (Required, string) Identifier for the data frame analytics job. 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
-
allow_no_match -
(Optional, Boolean) Specifies what to do when the request:
- Contains wildcard expressions and there are no data frame analytics jobs that match.
- Contains the
_allstring 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 emptydata_frame_analyticsarray when there are no matches and the subset of results when there are partial matches. If this parameter isfalse, the request returns a404status code when there are no matches or only partial matches. -
force - (Optional, Boolean) If true, the data frame analytics job is stopped forcefully.
-
timeout - (Optional, time units) Controls the amount of time to wait until the data frame analytics job stops. Defaults to 20 seconds.
Examples
The following example stops the loganalytics data frame analytics job:
POST _ml/data_frame/analytics/loganalytics/_stop
When the data frame analytics job stops, you receive the following results:
{
"stopped" : true
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/stop-dfanalytics.html