Skip to content

Commit ed94fc1

Browse files
committed
[API] Update missed tasks API endpoints
1 parent 24f5e9e commit ed94fc1

File tree

3 files changed

+20
-29
lines changed

3 files changed

+20
-29
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,10 @@ module Actions
2222

2323
# Cancel a specific task
2424
#
25-
# @option arguments [Number] :task_id Cancel the task with specified id
26-
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned
27-
# information; use `_local` to return information from the node
28-
# you're connecting to, leave empty to get information from all nodes
29-
# @option arguments [List] :actions A comma-separated list of actions that should be returned.
30-
# Leave empty to return all.
31-
# @option arguments [String] :parent_node Cancel tasks with specified parent node.
32-
# @option arguments [Number] :parent_task Cancel tasks with specified parent task id.
33-
# Set to -1 to cancel all.
25+
# @option arguments [String] :task_id Cancel the task with specified task id (node_id:task_number)
26+
# @option arguments [List] :nodes 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
27+
# @option arguments [List] :actions A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
28+
# @option arguments [String] :parent_task_id Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
3429
#
3530
# @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks-cancel.html
3631
#
@@ -50,10 +45,9 @@ def cancel(arguments={})
5045
#
5146
# @since 6.1.1
5247
ParamsRegistry.register(:cancel, [
53-
:node_id,
48+
:nodes,
5449
:actions,
55-
:parent_node,
56-
:parent_task ].freeze)
50+
:parent_task_id ].freeze)
5751
end
5852
end
5953
end

elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ module Actions
2222

2323
# Return information about a specific task
2424
#
25-
# @option arguments [String] :task_id Return the task with specified id (node_id:task_number)
25+
# @option arguments [String] :task_id Return the task with specified id (node_id:task_number) (*Required*)
2626
# @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false)
27+
# @option arguments [Time] :timeout Explicit operation timeout
2728
#
2829
# @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
2930
#
@@ -41,7 +42,9 @@ def get(arguments={})
4142
# Register this action with its valid params when the module is loaded.
4243
#
4344
# @since 6.1.1
44-
ParamsRegistry.register(:get, [ :wait_for_completion ].freeze)
45+
ParamsRegistry.register(:get, [
46+
:wait_for_completion,
47+
:timeout ].freeze)
4548
end
4649
end
4750
end

elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,13 @@ module Actions
2222

2323
# Return the list of tasks
2424
#
25-
# @option arguments [Number] :task_id Return the task with specified id
26-
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned
27-
# information; use `_local` to return information from the node
28-
# you're connecting to, leave empty to get information from all nodes
29-
# @option arguments [List] :actions A comma-separated list of actions that should be returned.
30-
# Leave empty to return all.
25+
# @option arguments [List] :nodes 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
26+
# @option arguments [List] :actions A comma-separated list of actions that should be returned. Leave empty to return all.
3127
# @option arguments [Boolean] :detailed Return detailed task information (default: false)
32-
# @option arguments [String] :parent_node Return tasks with specified parent node.
33-
# @option arguments [Number] :parent_task Return tasks with specified parent task id.
34-
# Set to -1 to return all.
35-
# @option arguments [String] :group_by Group tasks by nodes or parent/child relationships
36-
# Options: nodes, parents
28+
# @option arguments [String] :parent_task_id Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
3729
# @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false)
30+
# @option arguments [String] :group_by Group tasks by nodes or parent/child relationships (options: nodes, parents, none)
31+
# @option arguments [Time] :timeout Explicit operation timeout
3832
#
3933
# @see http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks-list.html
4034
#
@@ -54,13 +48,13 @@ def list(arguments={})
5448
#
5549
# @since 6.1.1
5650
ParamsRegistry.register(:list, [
57-
:node_id,
51+
:nodes,
5852
:actions,
5953
:detailed,
60-
:parent_node,
61-
:parent_task,
54+
:parent_task_id,
55+
:wait_for_completion,
6256
:group_by,
63-
:wait_for_completion ].freeze)
57+
:timeout ].freeze)
6458
end
6559
end
6660
end

0 commit comments

Comments
 (0)