[role="xpack"]
[testenv="basic"]
[[stop-data-frame-transform]]
=== Stop {dataframe-transforms} API

[subs="attributes"]
++++
<titleabbrev>Stop {dataframe-transforms}</titleabbrev>
++++

beta[]

Stops one or more {dataframe-transforms}.

[discrete]
[[stop-data-frame-transform-request]]
==== {api-request-title}

`POST _data_frame/transforms/<data_frame_transform_id>/_stop` +

`POST _data_frame/transforms/<data_frame_transform_id1>,<data_frame_transform_id2>/_stop` +

`POST _data_frame/transforms/_all/_stop`

[discrete]
[[stop-data-frame-transform-prereq]]
==== {api-prereq-title}

If the {es} {security-features} are enabled, you must have
`manage_data_frame_transforms` cluster privileges to use this API. The built-in
`data_frame_transforms_admin` role has these privileges. For more information,
see {stack-ov}/security-privileges.html[Security privileges] and
{stack-ov}/built-in-roles.html[Built-in roles].

[discrete]
[[stop-data-frame-transform-desc]]
==== {api-description-title}

You can stop multiple {dataframe-transforms} in a single API request by using a
comma-separated list of {dataframe-transforms} or a wildcard expression.
All {dataframe-transforms} can be stopped by using `_all` or `*` as the
`<data_frame_transform_id>`.

[discrete]
[[stop-data-frame-transform-path-parms]]
==== {api-path-parms-title}

`<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.

[discrete]
[[stop-data-frame-transform-query-parms]]
==== {api-query-parms-title}

`allow_no_match` (Optional)::
  (boolean) Whether to ignore if a wildcard expression matches no
  {dataframe-transforms}. This includes `_all` string or when no transforms have
  been specified. The default is `true`.

`timeout` (Optional)::
  (time value) If `wait_for_completion=true`, the API blocks for (at maximum)
  the specified duration while waiting for the transform 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 transform to `STOPPED`. The timeout simply means the API
  call itself timed out while waiting for the status change. Defaults to `30s`

`wait_for_completion` (Optional)::
  (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`.

[discrete]
[[stop-data-frame-transform-example]]
==== {api-example-title}

[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]
----
{
  "acknowledged" : true
}
----
// TESTRESPONSE
