---
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/4493/api/doc/elasticsearch/v8/operation/operation-transform-reset-transform
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v8/operation/operation-transform-reset-transform
products:
  - Elasticsearch
---

# Reset a transform

Availability: Generally available since 8.1

## Paths

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

#### Path parameters

- `transform_id` (string) — required
  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`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support 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}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-authentication-services.html)

## Query string parameters

- `force` (boolean · default: false) — optional
  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 · default: 30s) — optional
  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
}
```

