Namespace: API-Tasks

API-Tasks

Methods

(static) TasksApi#cancel(params, options, callback) → {Object|Promise.<never>|*}

Cancels a task, if it can be cancelled through an API.
See Also: OpenSearch - Task Cancelling
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
task_id string <optional>
Cancel the task with specified task id (node_id:task_number)
nodes string <optional>
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 string <optional>
A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
parent_task_id string <optional>
Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
wait_for_completion boolean <optional>
Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false
options Object Options for Transport#request
callback function Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *

(static) TasksApi#get(params, options, callback) → {Object|Promise.<never>|*}

Returns information about a task.
See Also: OpenSearch - Tasks
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
task_id string <optional>
Return the task with specified id (node_id:task_number)
wait_for_completion boolean <optional>
Wait for the matching tasks to complete (default: false)
timeout string <optional>
Explicit operation timeoutompletion] - Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false
options Object Options for Transport#request
callback function Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *

(static) TasksApi#list(params, options, callback) → {Object|Promise.<never>|*}

Returns a list of tasks.
See Also: OpenSearch - Tasks
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
nodes string <optional>
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 string <optional>
A comma-separated list of actions that should be returned. Leave empty to return all.
detailed boolean <optional>
Return detailed task information (default: false)
parent_task_id string <optional>
Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
wait_for_completion boolean <optional>
Wait for the matching tasks to complete (default: false)
group_by string <optional>
Group tasks by nodes or parent/child relationships (options: nodes, parents, none)
timeout string <optional>
Explicit operation timeout
options Object Options for Transport#request
callback function Callback that handles errors and response
Source:
Returns:
Type
Object | Promise.<never> | *