younifyd
Menu

Throttle a reindex operation

Throttle a reindex operation

POST/_reindex/{task_id}/_rethrottle

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Throttle a reindex operation action (under document).
  3. Fill in the fields below, then reference the result from later steps as {{throttleAReindexOperation.response.data}}.

Request

Path parameters

task_idstringrequired

The task identifier, returned when creating a reindex task, or by listing tasks via `GET /_reindex` or `GET /_tasks`. In stack, can be either the original task ID or the task ID of the relocated task.

Query parameters

requests_per_secondnumberrequired

The maximum number of documents to index per second, across the entire reindex operation (including slices). It can be either `-1` to turn off throttling or any decimal number like `1.7` or `12` to throttle to that level.

group_bystring

The way to group the tasks in the response. We recommend setting this to `none`, which provides the cleanest response format.

One ofnodesparentsnone

Response

Returns 200 with an object. Read it in later steps with {{throttleAReindexOperation.response.data.<field>}}.

node_failuresarray<object>

Node-level failures encountered while applying the rethrottle request. Will return a `failed_node_exception` wrapping a `no_such_node_exception`, if a node handling the task either never existed, or has left the cluster, and one of the following is true: 1. The task has completed. 2. The task cannot be found. Note: Rethrottle handles relocations, so it should succeed if the task can be found and has not completed.

typestringrequired

The type of error

reasononeOf

A human-readable explanation of the error, in English.

stack_tracestring

The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.

caused_byany
root_causearray<object>
suppressedarray<object>
task_failuresarray<object>

Per-task failures encountered while applying the rethrottle. If a rethrottle is attempted during a relocation handoff, the failure object reports `status: SERVICE_UNAVAILABLE` (the HTTP response itself is still `200 OK`). In this case, the request can be retried until success.

task_idnumberrequired
node_idanyrequired
statusstringrequired
reasonanyrequired
nodesobject

Tasks grouped by node, returned only when `group_by=nodes` (the default).

tasksany

The tasks that were successfully rethrottled. Always returned in serverless. Returned with `group_by=none` or `group_by=parents` in stack.

json
{
  "node_failures": [
    {
      "type": "string",
      "reason": null,
      "stack_trace": "string",
      "caused_by": null,
      "root_cause": [
        {}
      ],
      "suppressed": [
        {}
      ]
    }
  ],
  "task_failures": [
    {
      "task_id": 0,
      "node_id": null,
      "status": "string",
      "reason": null
    }
  ],
  "nodes": {},
  "tasks": null
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.