-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect GET path in tasks.asciidoc #49494
Conversation
Using GET /_cat/_tasks returns this error: ``` {"error":"Incorrect HTTP method for uri [/_cat/_tasks?v] and method [GET], allowed: [POST]","status":405} ``` Looking at the examples further down on the page, it should be `tasks` without the underscore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kellycampbell, thanks for rainsing this docs issue.
The second change looks good to me, I tried the first and was suprised it didn't work for me as expected on 7.4.2 (see comment). Maybe I'm missing something, but I'll wait for some feedback of the other to see how to proceed.
@@ -13,9 +13,9 @@ similar to the <<tasks,task management>> API. | |||
[[cat-tasks-api-request]] | |||
==== {api-request-title} | |||
|
|||
`GET /_cat/_tasks/<task_id>` | |||
`GET /_cat/tasks/<task_id>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried this on 7.4.2 and get something along the lines of
#! Deprecation: [types removal] Specifying types in document get requests is deprecated, use the /{index}/_doc/{id} endpoint instead.
{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index [_cat]",
"resource.type" : "index_expression",
"resource.id" : "_cat",
"index_uuid" : "_na_",
"index" : "_cat"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index [_cat]",
"resource.type" : "index_expression",
"resource.id" : "_cat",
"index_uuid" : "_na_",
"index" : "_cat"
},
"status" : 404
}
which to me looks like the request is hitting the wrong endpoint (trying to index a document).
If this is the case, this might either be a bug we should file, or if getting tasks by id via the _cat API isn't supposed to be working we should remove this from the docs. Maybe @jrodewig or @imotov have an idea
how to proceed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbuescher I'm seeing the same error on my end. I'll remove individual task retrieval from the docs. Thanks for raising this!
Pinging @elastic/es-distributed (:Distributed/Task Management) |
Pinging @elastic/es-docs (>docs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
As @cbuescher pointed out, we need to remove the docs for individual task retrieval. I've raised #49550 to handle this.
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
Previously, the request example included `GET _cat/_tasks`. However, the resource should be `tasks`, not `_tasks`.
Using GET
/_cat/_tasks
returns this error:Looking at the examples further down on the page, it should be
tasks
without the underscore.gradle check
?