---
type: api
title: Batch start or resume reindexing
description: Start or resume multiple reindexing tasks in one request. Additionally, reindexing tasks started or resumed via the batch endpoint will be placed on a queue and run one-by-one, which ensures that minimal cluster resources are consumed over time.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-batch-start-upgrade-reindex
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-batch-start-upgrade-reindex
products:
  - Kibana
---

# Batch start or resume reindexing

Availability:

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

## Paths

- `POST` `/api/upgrade_assistant/reindex/batch`

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

## Description

Start or resume multiple reindexing tasks in one request. Additionally, reindexing tasks started or resumed via the batch endpoint will be placed on a queue and run one-by-one, which ensures that minimal cluster resources are consumed over time.

## Request Body

`application/json`

- `indexNames` ([] string) — required
  The list of index names to be reindexed. The order of the indices determines the order that the reindex tasks are run.

## Response

Indicates a successful call.

`application/json`

- `enqueued` ([] object)
  A list of reindex tasks created. The order in the array indicates the order in which tasks will be run.
  - `errorMessage` (string)
    The error that caused the reindex to fail, if it failed.
  - `indexName` (string)
    The name of the old index.
  - `lastCompletedStep` (integer)
    The last successfully completed step of the reindex. For example:
- `0`: The reindex task has been created in Kibana. - `10`: The index group services stopped. Only applies to some system indices. - `20`: The index is set to readonly. - `30`: The new destination index has been created. - `40`: The reindex task in Elasticsearch has started. - `50`: The reindex task in Elasticsearch has completed. - `60`: Aliases were created to point to the new index, and the old index has been deleted. - `70`: The index group services have resumed. Only applies to some system indices.
  - `locked` (string)
  - `reindexOptions` ({})
    The presence of this key indicates that the reindex job will occur in the batch.
    - `queueSettings` (object)
      - `queuedAt` (number)
        A Unix timestamp of when the reindex task was placed in the queue.
  - `reindexTaskId` (string)
    The task ID of the reindex task in Elasticsearch. This value appears when the reindexing starts.
  - `reindexTaskPercComplete` (number)
    The progress of the reindexing task in Elasticsearch. It appears in decimal form, from 0 to 1.
  - `runningReindexCount` (number)
- `errors` ([] object)
  A list of errors that may have occurred preventing the reindex task from being created.
## Code Examples

#### Console

```console
POST /api/upgrade_assistant/reindex/batch
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/upgrade_assistant/reindex/batch"
```

## Response Examples

#### Batch start upgrade reindex response example1

```json
{
  "enqueued": [ 
    {
      "indexName": "index1",
      "newIndexName": "reindexed-v8-index1",
      "status": 3,
      "lastCompletedStep": 0,
      "locked": null,
      "reindexTaskId": null,
      "reindexTaskPercComplete": null,
      "errorMessage": null,
      "runningReindexCount": null,
      "reindexOptions": { 
        "queueSettings": {
          "queuedAt": 1583406985489 
        }
      }
    }
  ],
  "errors": [ 
    {
      "indexName": "index2",
      "message": "Something went wrong!"
    }
  ]
}
```

