

[[Elasticsearch_Namespaces_TasksNamespace]]
=== Elasticsearch\Namespaces\TasksNamespace



Class TasksNamespace
Generated running $ php util/GenerateEndpoints.php 7.4.2


*Methods*

The class defines the following methods:

* <<Elasticsearch_Namespaces_TasksNamespacecancel_cancel,`cancel()`>>
* <<Elasticsearch_Namespaces_TasksNamespaceget_get,`get()`>>
* <<Elasticsearch_Namespaces_TasksNamespacelist_list,`list()`>>
* <<Elasticsearch_Namespaces_TasksNamespacetasksList_tasksList,`tasksList()`>>



[[Elasticsearch_Namespaces_TasksNamespacecancel_cancel]]
.`cancel()`
****
[source,php]
----
/*
$params['task_id']        = (string) Cancel the task with specified task id (node_id:task_number)
$params['nodes']          = (list) 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
$params['actions']        = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
*/

$params = [
    // ...
];

$client = ClientBuilder::create()->build();
$response = $client->tasks()->cancel($params);
----
****



[[Elasticsearch_Namespaces_TasksNamespaceget_get]]
.`get()`
****
[source,php]
----
/*
$params['task_id']             = (string) Return the task with specified id (node_id:task_number)
$params['wait_for_completion'] = (boolean) Wait for the matching tasks to complete (default: false)
$params['timeout']             = (time) Explicit operation timeout
*/

$params = [
    // ...
];

$client = ClientBuilder::create()->build();
$response = $client->tasks()->get($params);
----
****



[[Elasticsearch_Namespaces_TasksNamespacelist_list]]
.`list()`
****
[source,php]
----
/*
$params['nodes']               = (list) 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
$params['actions']             = (list) A comma-separated list of actions that should be returned. Leave empty to return all.
*/

$params = [
    // ...
];

$client = ClientBuilder::create()->build();
$response = $client->tasks()->list($params);
----
****



[[Elasticsearch_Namespaces_TasksNamespacetasksList_tasksList]]
.`tasksList()`
****
[source,php]
----
/*
Proxy function to list() to prevent BC break since 7.4.0
*/

$params = [
    // ...
];

$client = ClientBuilder::create()->build();
$response = $client->tasks()->tasksList($params);
----
****


