---
type: api
title: Cancel reindexing
description: Cancel reindexes that are waiting for the Elasticsearch reindex task to complete. For example, cancel reindexing if the `lastCompletedStep` has the value `40`.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-cancel-upgrade-reindex
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-cancel-upgrade-reindex
products:
  - Kibana
---

# Cancel reindexing

Availability: Preview

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/upgrade_assistant/reindex/{index}/cancel`

#### Path parameters

- `index` (string) — required
  The name of the index that was reindexing.

## Description

Cancel reindexes that are waiting for the Elasticsearch reindex task to complete. For example, cancel reindexing if the `lastCompletedStep` has the value `40`.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Response

Indicates a successful call.

`application/json`

- `acknowledged` (boolean)
## Code examples

#### Console

```console
POST kbn:/api/upgrade_assistant/reindex/INDEX/cancel
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/upgrade_assistant/reindex/${INDEX}/cancel" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Cancel upgrade reindex response example1

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

