younifyd
Menu

Cancel a task (POST /_tasks/_cancel)

Cancel a task

POST/_tasks/_cancel

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Cancel a task (POST /_tasks/_cancel) action (under tasks).
  3. Fill in the fields below, then reference the result from later steps as {{cancelATaskPostTasksCancel.response.data}}.

Request

Query parameters

actionsoneOf

A comma-separated list or wildcard expression of actions that is used to limit the request.

nodesarray<string>

A comma-separated list of node IDs or names that is used to limit the request.

parent_task_idstring

A parent task ID that is used to limit the tasks.

wait_for_completionboolean

If true, the request blocks until all found tasks are complete.

Response

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

node_failuresarray<object>
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>
task_idnumberrequired
node_idanyrequired
statusstringrequired
reasonanyrequired
nodesobject

Task information grouped by node, if `group_by` was set to `node` (the default).

tasksany

Either a flat list of tasks if `group_by` was set to `none`, or grouped by parents if `group_by` was set to `parents`.

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.