Stop transforms API
Stops one or more transforms.
Request
POST _transform/<transform_id>/_stop
POST _transform/<transform_id1>,<transform_id2>/_stop
POST _transform/_all/_stop
Prerequisites
Requires the manage_transform cluster privilege. This privilege is included in the transform_admin built-in role.
Path parameters
-
<transform_id> - (Required, string) Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression. To stop all transforms, use
_allor*as the identifier.
Query parameters
-
allow_no_match -
(Optional, Boolean) Specifies what to do when the request:
- Contains wildcard expressions and there are no transforms 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 a successful acknowledgement message when there are no matches. When there are only partial matches, the API stops the appropriate transforms. For example, if the request containstest-id1*,test-id2*as the identifiers and there are no transforms that matchtest-id2*, the API nonetheless stops the transforms that matchtest-id1*.If this parameter is
false, the request returns a404status code when there are no matches or only partial matches. -
force - (Optional, Boolean) Set to
trueto stop a failed transform or to forcefully stop a transform that did not respond to the initial stop request. -
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 thantimeouttime 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 toSTOPPED. The timeout simply means the API call itself timed out while waiting for the status change. Defaults to30s. -
wait_for_checkpoint - (Optional, Boolean) If set to
true, the transform will not completely stop until the current checkpoint is completed. If set tofalse, the transform stops as soon as possible. Defaults tofalse. -
wait_for_completion - (Optional, Boolean) If set to
true, causes the API to block until the indexer state completely stops. If set tofalse, the API returns immediately and the indexer will be stopped asynchronously in the background. Defaults tofalse.
Response codes
-
404(Missing resources) - If
allow_no_matchisfalse, this code indicates that there are no resources that match the request or only partial matches for the request.
Examples
resp = client.transform.stop_transform(
transform_id="ecommerce_transform",
)
print(resp) response = client.transform.stop_transform( transform_id: 'ecommerce_transform' ) puts response
const response = await client.transform.stopTransform({
transform_id: "ecommerce_transform",
});
console.log(response); POST _transform/ecommerce_transform/_stop
When the transform stops, you receive the following results:
{
"acknowledged" : 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/8.17/stop-transform.html