Skip to content

Commit

Permalink
Docs: Use task_id in examples of tasks (#30436)
Browse files Browse the repository at this point in the history
We had been using `task_id:1` or `taskId:1` because it is parses as a
valid task identifier but the `:1` part is confusing. This replaces
those examples with `task_id` which matches the response from the list
tasks API.

Closes #28314
  • Loading branch information
nik9000 authored May 8, 2018
1 parent ce008c4 commit d20e8e2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
6 changes: 4 additions & 2 deletions docs/reference/cluster/tasks.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ It is also possible to retrieve information for a particular task:

[source,js]
--------------------------------------------------
GET _tasks/task_id:1 <1>
GET _tasks/task_id <1>
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]
// TEST[catch:missing]

<1> This will return a 404 if the task isn't found.
Expand All @@ -75,9 +76,10 @@ Or to retrieve all children of a particular task:

[source,js]
--------------------------------------------------
GET _tasks?parent_task_id=parentTaskId:1 <1>
GET _tasks?parent_task_id=parent_task_id <1>
--------------------------------------------------
// CONSOLE
// TEST[s/=parent_task_id/=node_id:1/]

<1> This won't return a 404 if the parent isn't found.

Expand Down
9 changes: 6 additions & 3 deletions docs/reference/docs/delete-by-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,10 @@ With the task id you can look up the task directly:

[source,js]
--------------------------------------------------
GET /_tasks/taskId:1
GET /_tasks/task_id
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]
// TEST[catch:missing]

The advantage of this API is that it integrates with `wait_for_completion=false`
Expand All @@ -378,8 +379,9 @@ Any Delete By Query can be canceled using the <<tasks,Task Cancel API>>:

[source,js]
--------------------------------------------------
POST _tasks/task_id:1/_cancel
POST _tasks/task_id/_cancel
--------------------------------------------------
// TEST[s/task_id/node_id:1/]
// CONSOLE

The `task_id` can be found using the tasks API above.
Expand All @@ -397,8 +399,9 @@ using the `_rethrottle` API:

[source,js]
--------------------------------------------------
POST _delete_by_query/task_id:1/_rethrottle?requests_per_second=-1
POST _delete_by_query/task_id/_rethrottle?requests_per_second=-1
--------------------------------------------------
// TEST[s/task_id/node_id:1/]
// CONSOLE

The `task_id` can be found using the tasks API above.
Expand Down
9 changes: 6 additions & 3 deletions docs/reference/docs/reindex.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,10 @@ With the task id you can look up the task directly:

[source,js]
--------------------------------------------------
GET /_tasks/taskId:1
GET /_tasks/task_id
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]
// TEST[catch:missing]

The advantage of this API is that it integrates with `wait_for_completion=false`
Expand All @@ -761,9 +762,10 @@ Any Reindex can be canceled using the <<tasks,Task Cancel API>>:

[source,js]
--------------------------------------------------
POST _tasks/task_id:1/_cancel
POST _tasks/task_id/_cancel
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]

The `task_id` can be found using the Tasks API.

Expand All @@ -780,9 +782,10 @@ the `_rethrottle` API:

[source,js]
--------------------------------------------------
POST _reindex/task_id:1/_rethrottle?requests_per_second=-1
POST _reindex/task_id/_rethrottle?requests_per_second=-1
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]

The `task_id` can be found using the Tasks API above.

Expand Down
9 changes: 6 additions & 3 deletions docs/reference/docs/update-by-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,10 @@ With the task id you can look up the task directly:

[source,js]
--------------------------------------------------
GET /_tasks/taskId:1
GET /_tasks/task_id
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]
// TEST[catch:missing]

The advantage of this API is that it integrates with `wait_for_completion=false`
Expand All @@ -436,9 +437,10 @@ Any Update By Query can be canceled using the <<tasks,Task Cancel API>>:

[source,js]
--------------------------------------------------
POST _tasks/task_id:1/_cancel
POST _tasks/task_id/_cancel
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]

The `task_id` can be found using the tasks API above.

Expand All @@ -455,9 +457,10 @@ using the `_rethrottle` API:

[source,js]
--------------------------------------------------
POST _update_by_query/task_id:1/_rethrottle?requests_per_second=-1
POST _update_by_query/task_id/_rethrottle?requests_per_second=-1
--------------------------------------------------
// CONSOLE
// TEST[s/task_id/node_id:1/]

The `task_id` can be found using the tasks API above.

Expand Down

0 comments on commit d20e8e2

Please sign in to comment.