---
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/4371/api/doc/elasticsearch/v9/operation/operation-ilm-retry
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v9/operation/operation-ilm-retry
products:
  - Elasticsearch
---

# Retry a policy

Availability: 6.6+

## Paths

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

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

#### Path Parameters

- `index` (string IndexName)
  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"
)
```

