---
type: api
title: Retry a policy
description: Retry running the lifecycle policy for an index that is in the ERROR step.
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-ilm-retry
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/elasticsearch/v8/operation/operation-ilm-retry
products:
  - Elasticsearch
---

# Retry a policy

Authentication: required

Availability: Generally available since 6.6

## Paths

- `POST` `/{index}/_ilm/retry`

#### Path parameters

- `index` (string) — required
  The name of the indices (comma-separated) whose failed lifecycle step is to be retry

## Description

Retry running the lifecycle policy for an index that is in the ERROR step.
The API sets the policy back to the step where the error occurred and runs the step.
Use the explain lifecycle state API to determine whether an index is in the ERROR step.

## Required authorization

- Index privileges: `manage_ilm`

## 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 /my-index-000001/_ilm/retry
```

#### JavaScript

```javascript
const response = await client.ilm.retry({
  index: "my-index-000001",
});
```

#### Python

```python
resp = client.ilm.retry(
    index="my-index-000001",
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/my-index-000001/_ilm/retry" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.ilm().retry(r -> r
    .index("my-index-000001")
);
```

#### C#

```c#
var response = await client.IndexLifecycleManagement.RetryAsync(index: "my-index-000001");
```

#### PHP

```php
$resp = $client->ilm()->retry([
    "index" => "my-index-000001",
]);
```

#### Ruby

```ruby
response = client.ilm.retry(
  index: "my-index-000001"
)
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "acknowledged": false
}
```

