---
type: api
title: Stop transforms
description: Stops one or more transforms.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch-serverless/operation/operation-transform-stop-transform
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch-serverless/operation/operation-transform-stop-transform
products:
  - Elasticsearch Serverless
---

# Stop transforms

## Paths

- `POST` `/_transform/{transform_id}/_stop`

#### Path parameters

- `transform_id` (string) — required
  Identifier for the transform. To stop multiple transforms, use a comma-separated list or a wildcard expression.
To stop all transforms, use `_all` or `*` as the identifier.

## Description

Stops one or more transforms.

## Required authorization

- Cluster privileges: `manage_transform`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs use key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  For more information about where to find API keys for the Elasticsearch endpoint (${ES_URL}) for a project, go to [Get started with Elasticsearch Serverless](https://www.elastic.co/docs/solutions/search/serverless-elasticsearch-get-started).

## Query string parameters

- `allow_no_match` (boolean · default: true) — optional
  Specifies what to do when the request: contains wildcard expressions and there are no transforms that match;
contains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there
are only partial matches.

If it is true, the API returns a successful acknowledgement message when there are no matches. When there are
only partial matches, the API stops the appropriate transforms.

If it is false, the request returns a 404 status code when there are no matches or only partial matches.
- `force` (boolean · default: false) — optional
  If it is true, the API forcefully stops the transforms.
- `timeout` (string · default: 30s) — optional
  Period to wait for a response when `wait_for_completion` is `true`. If no response is received before the
timeout expires, the request returns a timeout exception. However, the request continues processing and
eventually moves the transform to a STOPPED state.
- `wait_for_checkpoint` (boolean · default: false) — optional
  If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false,
the transform stops as soon as possible.
- `wait_for_completion` (boolean · default: false) — optional
  If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns
immediately and the indexer is stopped asynchronously in the background.

## Response

`application/json`

- `acknowledged` (boolean)
  For a successful response, this value is always true. On failure, an exception is returned instead.
## Code examples

#### Console

```console
POST _transform/ecommerce_transform/_stop
```

#### JavaScript

```javascript
const response = await client.transform.stopTransform({
  transform_id: "ecommerce_transform",
});
```

#### Python

```python
resp = client.transform.stop_transform(
    transform_id="ecommerce_transform",
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/_transform/ecommerce_transform/_stop" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.transform().stopTransform(s -> s
    .transformId("ecommerce_transform")
);
```

#### C#

```c#
var response = await client.TransformManagement.StopTransformAsync(transformId: "ecommerce_transform");
```

#### PHP

```php
$resp = $client->transform()->stopTransform([
    "transform_id" => "ecommerce_transform",
]);
```

#### Ruby

```ruby
response = client.transform.stop_transform(
  transform_id: "ecommerce_transform"
)
```

## Response examples

#### Stop transform response example1

A successful response when a transform stops.

```json
{
  "acknowledged": true
}
```

