Elastic Stack (ELK Stack) Reindex API

The reindex API from Elastic Stack (ELK Stack) — 3 operation(s) for reindex.

Operations 3

POST /_reindex/{task_id}/_cancel Cancel an ongoing reindex task #
GET /_reindex/{task_id} Get the status and progress of a specific reindex task #
GET /_reindex Get information about all currently running reindex tasks #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elk-stack-reindex-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elk-stack-reindex-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Elasticsearch Request & Response Specification Reindex API
  license:
    name: Apache 2.0
    url: https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE
  version: ''
tags:
- name: reindex
paths:
  /_reindex/{task_id}/_cancel:
    post:
      tags:
      - reindex
      summary: Cancel an ongoing reindex task
      description: "If `wait_for_completion` is `true` (the default), the response contains the final task state after cancellation.\nIf `wait_for_completion` is `false`, the response contains only `acknowledged: true`.\n\nThis API follows reindex tasks across node-shutdown relocations, so callers can\nkeep using the original task ID throughout the lifetime of the operation.\nReturned task IDs and timings reflect the original task, not its relocated successor.\nRelocated task IDs are also supported. They are followed transparently and return the task ID and timings of the original task.\n\nWhen the task ID cannot be cancelled (unknown ID, non-reindex task, sliced child, finished task, or node left with no stored result), the API returns the following response with a 404 status code:\n```\n{\n  \"error\": {\n    \"type\": \"resource_not_found_exception\",\n    \"reason\": \"reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed\"\n  },\n  \"status\": 404\n}\n```\n\nDuring a brief handoff window of a node-shutdown relocation, you may receive the response below with a 503 status code.\nRetry with the same task ID; the retry follows the relocated task transparently.\n```\n{\n  \"error\": {\n    \"type\": \"status_exception\",\n    \"reason\": \"cannot cancel task [36619] because it is being relocated\"\n  },\n  \"status\": 503\n}\n```"
      operationId: cancel-reindex
      parameters:
      - in: path
        name: task_id
        description: The ID of the reindex task to cancel.
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.TaskId'
        style: simple
      - in: query
        name: wait_for_completion
        description: 'If `true` (the default), the request blocks until the cancellation is complete and returns the final task state.

          If `false`, the request returns immediately with `acknowledged: true`.'
        deprecated: false
        schema:
          default: true
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  acknowledged:
                    description: Present and `true` when `wait_for_completion=false`.
                    type: boolean
                  completed:
                    description: Whether the reindex task has completed. Present when `wait_for_completion=true`.
                    type: boolean
                  id:
                    description: 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. Present when `wait_for_completion=true`.
                    allOf:
                    - $ref: '#/components/schemas/_types.TaskId'
                  description:
                    description: A sanitized description of the reindex operation.
                    type: string
                  start_time_in_millis:
                    description: The time at which the reindex task started, in milliseconds since the Unix epoch.
                    allOf:
                    - $ref: '#/components/schemas/_types.EpochTimeUnitMillis'
                  start_time:
                    description: The time at which the reindex task started, as an ISO 8601 formatted string.
                    type: string
                  running_time:
                    description: 'The elapsed running time of the reindex task, in a human-readable format.

                      Only present when the request includes the `?human=true` query parameter.'
                    allOf:
                    - $ref: '#/components/schemas/_types.Duration'
                  running_time_in_nanos:
                    description: The elapsed running time of the reindex task, in nanoseconds.
                    allOf:
                    - $ref: '#/components/schemas/_types.DurationValueUnitNanos'
                  cancelled:
                    description: Whether the reindex task has been cancelled.
                    type: boolean
                  status:
                    description: The status of the reindex operation at the time of cancellation.
                    allOf:
                    - $ref: '#/components/schemas/_types.ReindexStatus'
                  error:
                    description: The error that caused the reindex task to fail, if any.
                    allOf:
                    - $ref: '#/components/schemas/_types.ErrorCause'
                  response:
                    description: The final result of the reindex operation, if it completed before being cancelled.
                    allOf:
                    - $ref: '#/components/schemas/_types.ReindexTaskResult'
              examples:
                CancelReindexResponseExample1:
                  summary: Cancellation completed
                  description: 'A successful response from `POST _reindex/{task_id}/_cancel` (the default `wait_for_completion=true`). The response includes the final task state with `cancelled: true` and the `response` block summarising work done before cancellation.

                    '
                  value: "{\n  \"completed\": true,\n  \"id\": \"iXIKIbk_T4aF05n5iTA0nA:876\",\n  \"description\": \"reindex from [cancel_reindex_src] to [cancel_reindex_dst]\",\n  \"start_time_in_millis\": 1778265634844,\n  \"running_time_in_nanos\": 1096397958,\n  \"cancelled\": true,\n  \"status\": {\n    \"total\": 170,\n    \"updated\": 0,\n    \"created\": 16,\n    \"deleted\": 0,\n    \"batches\": 8,\n    \"version_conflicts\": 0,\n    \"noops\": 0,\n    \"retries\": {\n      \"bulk\": 0,\n      \"search\": 0\n    },\n    \"throttled_millis\": 941,\n    \"requests_per_second\": 17.0,\n    \"canceled\": \"by user request\",\n    \"throttled_until_millis\": 0,\n    \"slices\": [\n      {\n        \"slice_id\": 0,\n        \"total\": 75,\n        \"updated\": 0,\n        \"created\": 6,\n        \"deleted\": 0,\n        \"batches\": 3,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled_millis\": 235,\n        \"requests_per_second\": -1.0,\n        \"canceled\": \"by user request\",\n        \"throttled_until_millis\": 0\n      },\n      {\n        \"slice_id\": 1,\n        \"total\": 95,\n        \"updated\": 0,\n        \"created\": 10,\n        \"deleted\": 0,\n        \"batches\": 5,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled_millis\": 705,\n        \"requests_per_second\": -1.0,\n        \"canceled\": \"by user request\",\n        \"throttled_until_millis\": 0\n      }\n    ]\n  },\n  \"response\": {\n    \"took\": 1074,\n    \"timed_out\": false,\n    \"total\": 170,\n    \"updated\": 0,\n    \"created\": 16,\n    \"deleted\": 0,\n    \"batches\": 8,\n    \"version_conflicts\": 0,\n    \"noops\": 0,\n    \"retries\": {\n      \"bulk\": 0,\n      \"search\": 0\n    },\n    \"throttled\": \"941.1ms\",\n    \"throttled_millis\": 941,\n    \"requests_per_second\": 17.0,\n    \"canceled\": \"by user request\",\n    \"throttled_until\": \"0s\",\n    \"throttled_until_millis\": 0,\n    \"slices\": [\n      {\n        \"slice_id\": 0,\n        \"total\": 75,\n        \"updated\": 0,\n        \"created\": 6,\n        \"deleted\": 0,\n        \"batches\": 3,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled\": \"235.2ms\",\n        \"throttled_millis\": 235,\n        \"requests_per_second\": -1.0,\n        \"canceled\": \"by user request\",\n        \"throttled_until\": \"0s\",\n        \"throttled_until_millis\": 0\n      },\n      {\n        \"slice_id\": 1,\n        \"total\": 95,\n        \"updated\": 0,\n        \"created\": 10,\n        \"deleted\": 0,\n        \"batches\": 5,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled\": \"705.8ms\",\n        \"throttled_millis\": 705,\n        \"requests_per_second\": -1.0,\n        \"canceled\": \"by user request\",\n        \"throttled_until\": \"0s\",\n        \"throttled_until_millis\": 0\n      }\n    ],\n    \"failures\": []\n  }\n}"
                CancelReindexResponseExample2:
                  summary: Cancellation acknowledged
                  description: 'A successful response from `POST _reindex/{task_id}/_cancel?wait_for_completion=false`. The cancellation has been acknowledged but may not yet have taken effect; use the get reindex API to observe progress.

                    '
                  value: "{\n  \"acknowledged\": true\n}"
      x-state: Generally available; Added in 9.5.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_reindex/{task_id}:
    get:
      tags:
      - reindex
      summary: Get the status and progress of a specific reindex task
      description: "This API follows reindex tasks across node-shutdown relocations, so callers can\nkeep using the original task ID throughout the lifetime of the operation.\nReturned task IDs and timings reflect the original task, not its relocated successor.\nRelocated task IDs are also supported. They are followed transparently and return the task ID and timings of the original task.\n\nWhen the task ID cannot be resolved, the API returns the response below with a 404 status code.\nThis 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).\n```\n{\n  \"error\": {\n    \"type\": \"resource_not_found_exception\",\n    \"reason\": \"Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found\"\n  },\n  \"status\": 404\n}\n```"
      operationId: get-reindex
      parameters:
      - in: path
        name: task_id
        description: The ID of the reindex task to retrieve.
        required: true
        deprecated: false
        schema:
          $ref: '#/components/schemas/_types.TaskId'
        style: simple
      - in: query
        name: wait_for_completion
        description: If `true`, the request blocks until the reindex task completes, then returns the result.
        deprecated: false
        schema:
          default: false
          type: boolean
        style: form
      - in: query
        name: timeout
        description: The period to wait for the reindex task to complete when `wait_for_completion` is `true`.
        deprecated: false
        schema:
          default: 30s
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  completed:
                    description: Whether the reindex task has completed.
                    type: boolean
                  id:
                    description: 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.
                    allOf:
                    - $ref: '#/components/schemas/_types.TaskId'
                  description:
                    description: A sanitized description of the reindex operation (source and destination indices, and optionally remote host info).
                    type: string
                  start_time_in_millis:
                    description: The time at which the reindex task started, in milliseconds since the Unix epoch.
                    allOf:
                    - $ref: '#/components/schemas/_types.EpochTimeUnitMillis'
                  start_time:
                    description: '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.'
                    type: string
                  running_time:
                    description: 'The elapsed running time of the reindex task, in a human-readable format.

                      Only present when the request includes the `?human=true` query parameter.'
                    allOf:
                    - $ref: '#/components/schemas/_types.Duration'
                  running_time_in_nanos:
                    description: The elapsed running time of the reindex task, in nanoseconds.
                    allOf:
                    - $ref: '#/components/schemas/_types.DurationValueUnitNanos'
                  cancelled:
                    description: Whether the reindex task has been cancelled.
                    type: boolean
                  status:
                    description: The current progress of the reindex operation.
                    allOf:
                    - $ref: '#/components/schemas/_types.ReindexStatus'
                  error:
                    description: The error that caused the reindex task to fail, if any.
                    allOf:
                    - $ref: '#/components/schemas/_types.ErrorCause'
                  response:
                    description: The final result of the completed reindex operation, if the task has finished successfully.
                    allOf:
                    - $ref: '#/components/schemas/_types.ReindexTaskResult'
                required:
                - completed
                - id
                - start_time_in_millis
                - running_time_in_nanos
                - cancelled
              examples:
                GetReindexResponseExample1:
                  summary: In-progress task
                  description: 'A successful response for an in-progress reindex task. The `status` block reports current progress; the `response` block is absent until the task completes.

                    '
                  value: "{\n  \"completed\": false,\n  \"id\": \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n  \"description\": \"reindex from [reindex_src] to [reindex_dst]\",\n  \"start_time_in_millis\": 1778265266199,\n  \"running_time_in_nanos\": 1588606084,\n  \"cancelled\": false,\n  \"status\": {\n    \"total\": 0,\n    \"updated\": 0,\n    \"created\": 0,\n    \"deleted\": 0,\n    \"batches\": 0,\n    \"version_conflicts\": 0,\n    \"noops\": 0,\n    \"retries\": {\n      \"bulk\": 0,\n      \"search\": 0\n    },\n    \"throttled_millis\": 0,\n    \"requests_per_second\": 4.0,\n    \"throttled_until_millis\": 0,\n    \"slices\": [\n      null,\n      null\n    ]\n  }\n}"
                GetReindexResponseExample2:
                  summary: Completed task
                  description: 'A successful response for a completed reindex task. The final outcome is in the `response` block.

                    '
                  value: "{\n  \"completed\": true,\n  \"id\": \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n  \"description\": \"reindex from [reindex_src] to [reindex_dst]\",\n  \"start_time_in_millis\": 1778265266199,\n  \"running_time_in_nanos\": 35457187167,\n  \"cancelled\": false,\n  \"status\": {\n    \"total\": 240,\n    \"updated\": 0,\n    \"created\": 240,\n    \"deleted\": 0,\n    \"batches\": 120,\n    \"version_conflicts\": 0,\n    \"noops\": 0,\n    \"retries\": {\n      \"bulk\": 0,\n      \"search\": 0\n    },\n    \"throttled_millis\": 2999,\n    \"requests_per_second\": -1.0,\n    \"throttled_until_millis\": 0,\n    \"slices\": [\n      {\n        \"slice_id\": 0,\n        \"total\": 174,\n        \"updated\": 0,\n        \"created\": 174,\n        \"deleted\": 0,\n        \"batches\": 87,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled_millis\": 999,\n        \"requests_per_second\": -1.0,\n        \"throttled_until_millis\": 0\n      },\n      {\n        \"slice_id\": 1,\n        \"total\": 66,\n        \"updated\": 0,\n        \"created\": 66,\n        \"deleted\": 0,\n        \"batches\": 33,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled_millis\": 1999,\n        \"requests_per_second\": -1.0,\n        \"throttled_until_millis\": 0\n      }\n    ]\n  },\n  \"response\": {\n    \"took\": 35434,\n    \"timed_out\": false,\n    \"total\": 240,\n    \"updated\": 0,\n    \"created\": 240,\n    \"deleted\": 0,\n    \"batches\": 120,\n    \"version_conflicts\": 0,\n    \"noops\": 0,\n    \"retries\": {\n      \"bulk\": 0,\n      \"search\": 0\n    },\n    \"throttled\": \"2.9s\",\n    \"throttled_millis\": 2999,\n    \"requests_per_second\": -1.0,\n    \"throttled_until\": \"0s\",\n    \"throttled_until_millis\": 0,\n    \"slices\": [\n      {\n        \"slice_id\": 0,\n        \"total\": 174,\n        \"updated\": 0,\n        \"created\": 174,\n        \"deleted\": 0,\n        \"batches\": 87,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled\": \"999.9ms\",\n        \"throttled_millis\": 999,\n        \"requests_per_second\": -1.0,\n        \"throttled_until\": \"0s\",\n        \"throttled_until_millis\": 0\n      },\n      {\n        \"slice_id\": 1,\n        \"total\": 66,\n        \"updated\": 0,\n        \"created\": 66,\n        \"deleted\": 0,\n        \"batches\": 33,\n        \"version_conflicts\": 0,\n        \"noops\": 0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled\": \"1.9s\",\n        \"throttled_millis\": 1999,\n        \"requests_per_second\": -1.0,\n        \"throttled_until\": \"0s\",\n        \"throttled_until_millis\": 0\n      }\n    ],\n    \"failures\": []\n  }\n}"
      x-state: Generally available; Added in 9.5.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  /_reindex:
    get:
      tags:
      - reindex
      summary: Get information about all currently running reindex tasks
      description: 'Reindex tasks that are mid-relocation between nodes are reported once,

        under their original task ID, so callers do not see duplicates across the relocation chain.


        If the API returns a HTTP status of `200 OK`, but `node_failures` or `task_failures` are non-empty in the body, the listing is not a complete authoritative listing and may be missing tasks.'
      operationId: list-reindex
      parameters:
      - in: query
        name: detailed
        description: If `true`, include detailed task status information in the response.
        deprecated: false
        schema:
          default: false
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  reindex:
                    description: The list of currently running reindex tasks.
                    type: array
                    items:
                      $ref: '#/components/schemas/_types.ReindexTaskInfo'
                  task_failures:
                    description: Per-task failures encountered while listing reindex tasks. Tasks that failed are not included in the `reindex` array.
                    type: array
                    items:
                      $ref: '#/components/schemas/_types.TaskFailure'
                  node_failures:
                    description: 'Node-level failures encountered while listing reindex tasks.

                      Typically populated when a node disconnects or stops responding mid-request,

                      reindex tasks running on such nodes will be missing from the `reindex` array for the duration of the disruption.'
                    type: array
                    items:
                      $ref: '#/components/schemas/_types.ErrorCause'
                required:
                - reindex
              examples:
                ListReindexResponseExample1:
                  summary: One running task
                  description: A successful response from `GET _reindex` listing a single currently running reindex task.
                  value: "{\n  \"reindex\": [\n    {\n      \"id\": \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n      \"start_time_in_millis\": 1762190000000,\n      \"running_time_in_nanos\": 4200000000,\n      \"cancelled\": false\n    }\n  ]\n}"
                ListReindexResponseExample2:
                  summary: One running task with detailed status
                  description: 'A successful response from `GET _reindex?detailed=true&human=true`, including the per-task `status` block.

                    '
                  value: "{\n  \"reindex\": [\n    {\n      \"id\": \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n      \"description\": \"reindex from [my-source-index] to [my-dest-index]\",\n      \"start_time_in_millis\": 1762190000000,\n      \"start_time\": \"2025-11-03T17:13:20.000Z\",\n      \"running_time_in_nanos\": 4200000000,\n      \"running_time\": \"4.2s\",\n      \"cancelled\": false,\n      \"status\": {\n        \"batches\": 4,\n        \"deleted\": 0,\n        \"noops\": 0,\n        \"requests_per_second\": -1.0,\n        \"retries\": {\n          \"bulk\": 0,\n          \"search\": 0\n        },\n        \"throttled_millis\": 0,\n        \"throttled_until_millis\": 0,\n        \"total\": 11500,\n        \"updated\": 0,\n        \"version_conflicts\": 0,\n        \"created\": 4000\n      }\n    }\n  ]\n}"
                ListReindexResponseNodeFailureExample1:
                  summary: Partial list with node failure (HTTP 200)
                  description: '`GET _reindex` always returns `200 OK`. If a node stops responding during the listing call, `node_failures` may be populated and tasks that were running on that node can be missing from `reindex` for that response. You may retry.

                    '
                  value: "{\n  \"reindex\": [\n    {\n      \"id\": \"r1A2WoRbTwKZ516z6NEs5A:36619\",\n      \"start_time_in_millis\": 1762190000000,\n      \"running_time_in_nanos\": 4200000000,\n      \"cancelled\": false\n    }\n  ],\n  \"node_failures\": [\n    {\n      \"type\": \"failed_node_exception\",\n      \"reason\": \"Failed node [xNqz7mM2RkqY8vP1nL0wQ]\",\n      \"node_id\": \"xNqz7mM2RkqY8vP1nL0wQ\",\n      \"caused_by\": {\n        \"type\": \"node_not_connected_exception\",\n        \"reason\": \"Node not connected\",\n        \"node_id\": \"xNqz7mM2RkqY8vP1nL0wQ\"\n      }\n    }\n  ]\n}"
      x-state: Generally available; Added in 9.5.0
      x-metaTags:
      - content: Elasticsearch
        name: product_name
components:
  schemas:
    _types.NodeId:
      type: string
    _types.TaskId:
      type: string
    _types.DurationValueUnitMillis:
      allOf:
      - $ref: '#/components/schemas/_types.UnitMillis'
    _types.ErrorCause:
      description: 'Cause and details about a request failure. This class defines the properties common to all error types.

        Additional details are also provided, that depend on the error type.'
      type: object
      properties:
        type:
          description: The type of error
          type: string
        reason:
          description: A human-readable explanation of the error, in English.
          oneOf:
          - type: string
          - type:
            - string
            - 'null'
        stack_trace:
          description: The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.
          type: string
        caused_by:
          allOf:
          - $ref: '#/components/schemas/_types.ErrorCause'
        root_cause:
          type: array
          items:
            $ref: '#/components/schemas/_types.ErrorCause'
        suppressed:
          type: array
          items:
            $ref: '#/components/schemas/_types.ErrorCause'
      required:
      - type
    _types.EpochTimeUnitMillis:
      allOf:
      - $ref: '#/components/schemas/_types.UnitMillis'
    _types.ReindexTaskResult:
      description: 'The final result of a completed reindex operation, as stored in the task result.

        This is the serialized form of `BulkByScrollResponse`.'
      type: object
      properties:
        batches:
          description: The number of scroll responses pulled back by the reindex.
          type: number
        created:
          description: The number of documents that were successfully created.
          type: number
        deleted:
          description: The number of documents that were successfully deleted.
          type: number
        failures:
          description: Any failures encountered during the reindex. If non-empty, the reindex ended because of these failures.
          type: array
          items:
            $ref: '#/components/schemas/_types.BulkIndexByScrollFailure'
        noops:
          description: The number of documents that were ignored because the script returned a `noop` value for `ctx.op`.
          type: number
        requests_per_second:
          description: The number of requests per second effectively executed during the reindex.
          type: number
        retries:
          description: The number of retries attempted by reindex.
          allOf:
          - $ref: '#/components/schemas/_types.Retries'
        throttled_millis:
          description: Number of milliseconds the request slept to conform to `requests_per_second`.
          allOf:
          - $ref: '#/components/schemas/_types.DurationValueUnitMillis'
        throttled_until_millis:
          description: This field should always be equal to zero in a completed reindex result.
          allOf:
          - $ref: '#/components/schemas/_types.DurationValueUnitMillis'
        timed_out:
          description: Whether any of the requests executed during the reindex timed out.
          type: boolean
        took:
          description: The total milliseconds the entire operation took.
          allOf:
          - $ref: '#/components/schemas/_types.DurationValueUnitMillis'
        total:
          description: The number of documents that were successfully processed.
          type: number
        updated:
          description: The number of documents that were successfully updated.
          type: number
        version_conflicts:
          description: The number of version conflicts that occurred.
          type: number
    _types.BulkIndexByScrollFailure:
      type: object
      properties:
        cause:
          allOf:
          - $ref: '#/components/schemas/_types.ErrorCause'
        id:
          allOf:
          - $ref: '#/components/schemas/_types.Id'
        index:
          allOf:
          - $ref: '#/components/schemas/_types.IndexName'
        status:
          type: number
      required:
      - cause
      - id
      - index
      - status
    _types.Id:
      type: string
    _types.IndexName:
      type: string
    _types.UnitNanos:
      description: Time unit for nanoseconds
      type: number
    _types.Duration:
      externalDocs:
        url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units
      description: 'A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and

        `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.'
      oneOf:
      - type: string
      - type: string
        enum:
        - '-1'
      - type: string
        enum:
        - '0'
    _types.ReindexTaskInfo:
      description: Information about a single parent reindex task, as returned by the reindex management APIs.
      type: object
      properties:
        id:
          description: The ID of the reindex task. The ID is assigned when the task was first created and remains the same across graceful shutdown relocations.
          allOf:
          - $ref: '#/components/schemas/_types.TaskId'
        description:
          description: A sanitized description of the reindex operation (source and destination indices, and optionally remote host info).
          type: string
        start_time_in_millis:
          description: The time at which the reindex task started, in milliseconds since the Unix epoch. Remains the same across graceful shutdown relocations.
          allOf:
          - $ref: '#/components/schemas/_types.EpochTimeUnitMillis'
        start_time:
          description: 'The time at which the reindex task started, as an ISO-8601 formatted string. Remains the same across graceful shutdown relocations.

            Only present when the request includes the `?human=true` query parameter.'
          type: string
        running_time:
          description: 'The elapsed running time of the reindex task, including relocations, in a human-readable format.

            Only present when the request includes the `?human=true` query parameter.'
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        running_time_in_nanos:
          description: The elapsed running time of the reindex task, including relocations, in nanoseconds.
          allOf:
          - $ref: '#/components/schemas/_types.DurationValueUnitNanos'
        cancelled:
          description: Whether the reindex task has been cancelled.
          type: boolean
        status:
          description: The current progress of the reindex operation.
          allOf:
          - $ref: '#/components/schemas/_types.ReindexStatus'
      required:
      - id
      - start_time_in_millis
      - running_time_in_nanos
      - cancelled
    _types.ReindexStatus:
      type: object
      properties:
        slice_id:
          description: The slice ID
          type: number
        batches:
          description: The number of scroll responses pulled back by the reindex.
          type: number
        created:
          description: The number of documents that were successfully created.
          type: number
        deleted:
          description: The number of documents that were successfully deleted.
          type: number
        noops:
          description: The number of documents that were ignored because the script used for the reindex returned a `noop` value for `ctx.op`.
          type: number
        requests_per_second:
          description: The number of requests per second effectively executed during the reindex.
          type: number
        retries:
          description: The number of retries attempted by reindex. `bulk` is the number of bulk actions retried and `search` is the number of search actions retried.
          allOf:
          - $ref: '#/components/schemas/_types.Retries'
        throttled:
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        throttled_millis:
          description: Number of milliseconds the request slept to conform to `requests_per_second`.
          allOf:
          - $ref: '#/components/schemas/_types.DurationValueUnitMillis'
        throttled_until:
          allOf:
          - $ref: '#/components/schemas/_types.Duration'
        throttled_until_millis:
          description: 'This field should always be equal to zero in a `_reindex` response.

            It only has meaning when using the Task API, where it indicates the next time (in milliseconds since epoch) a throttled request will be executed again in order to conform to `requests_per_second`.'
          allOf:
          - $ref: '#/components/schemas/_types.DurationValueUnitMillis'
        total:
          description: The number of documents that were successfully processed.
          type: number
        updated:
          description: The number of documents that were successfully updated, for example, a document with same ID already existed prior to reindex updating it.
          type: number
        version_con

# --- truncated at 32 KB (33 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-reindex-api-openapi.yml