---
type: api
title: Reset a transform
description: Before you can reset it, you must stop it; alternatively, use the `force` query parameter.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-transform-reset-transform
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-transform-reset-transform
products:
  - Elasticsearch
---

# Reset a transform

Availability: 8.1+

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#bearerauth)

#### Path Parameters

- `transform_id` (string Id)
  Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9),
hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters.

## Description

Before you can reset it, you must stop it; alternatively, use the `force` query parameter.
If the destination index was created by the transform, it is deleted.

## Required authorization

* Cluster privileges: `manage_transform`

## Query String Parameters

- `force` (boolean · default: false)
  If this value is `true`, the transform is reset regardless of its current state. If it's `false`, the transform
must be stopped before it can be reset.
- `timeout` (string Duration · default: 30s)
  Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

## 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/_reset
```

#### JavaScript

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

#### Python

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

#### curl

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

#### Java

```java
client.transform().resetTransform(r -> r
    .transformId("ecommerce_transform")
);
```

#### C#

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

#### PHP

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

#### Ruby

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

## Response Examples

#### Reset transform response example1

A successful response when the transform is reset.

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

