Type to search.

Get the status and progress of a specific reindex task

Auth

This API follows reindex tasks across node-shutdown relocations, so callers can keep using the original task ID throughout the lifetime of the operation. Returned task IDs and timings reflect the original task, not its relocated successor. Relocated task IDs are also supported. They are followed transparently and return the task ID and timings of the original task.

When the task ID cannot be resolved, the API returns the response below with a 404 status code. This response is used whether the ID is unknown, refers to a non-reindex task, refers to a sliced child subtask, or refers to a task whose node left the cluster with no stored result (e.g. a non-graceful shutdown).

Text
{
  "error": {
    "type": "resource_not_found_exception",
    "reason": "Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found"
  },
  "status": 404
}

Required privileges

Cluster privileges monitor monitor_reindex manage_reindex

Path parameters

task_id string required

The ID of the reindex task to retrieve.

Query parameters

wait_for_completion boolean · default: false

If true, the request blocks until the reindex task completes, then returns the result.

timeout union oneOf · default: 30s

The period to wait for the reindex task to complete when wait_for_completion is true.

Values: -1 0

Response

application/json
completed boolean required

Whether the reindex task has completed.

id string required

The ID of the reindex task. The value is the ID assigned when the task was first created and remains stable across node-shutdown relocations.

description string

A sanitized description of the reindex operation (source and destination indices, and optionally remote host info).

start_time_in_millis number required

The time at which the reindex task started, in milliseconds since the Unix epoch.

start_time string

The time at which the reindex task started, as an ISO 8601 formatted string. Only present when the request includes the ?human=true query parameter.

running_time union oneOf

The elapsed running time of the reindex task, in a human-readable format. Only present when the request includes the ?human=true query parameter.

Values: -1 0
running_time_in_nanos number required

The elapsed running time of the reindex task, in nanoseconds.

cancelled boolean required

Whether the reindex task has been cancelled.