{
  "tasks.cancel": {
    "documentation": {
      "url": "https://www.elastic.co/guide/en/elasticsearch/reference/8.19/tasks.html",
      "description": "Cancel a task"
    },
    "stability": "experimental",
    "visibility": "public",
    "headers": {
      "accept": [
        "application/json"
      ]
    },
    "url": {
      "paths": [
        {
          "path": "/_tasks/_cancel",
          "methods": [
            "POST"
          ]
        },
        {
          "path": "/_tasks/{task_id}/_cancel",
          "methods": [
            "POST"
          ],
          "parts": {
            "task_id": {
              "type": "string",
              "description": "Cancel the task with specified task id (node_id:task_number)"
            }
          }
        }
      ]
    },
    "params": {
      "nodes": {
        "type": "list",
        "description": "A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes"
      },
      "actions": {
        "type": "list",
        "description": "A comma-separated list of actions that should be cancelled. Leave empty to cancel all."
      },
      "parent_task_id": {
        "type": "string",
        "description": "Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all."
      },
      "wait_for_completion": {
        "type": "boolean",
        "default": false,
        "description": "Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false"
      }
    }
  }
}
