Skip to content
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

cat API help is broken when url parameters are specified #27424

Closed
spinscale opened this issue Nov 17, 2017 · 8 comments
Closed

cat API help is broken when url parameters are specified #27424

spinscale opened this issue Nov 17, 2017 · 8 comments
Labels
>bug :Data Management/CAT APIs Text APIs behind /_cat

Comments

@spinscale
Copy link
Contributor

Elasticsearch version (bin/elasticsearch --version): 6.0.0

Description of the problem including expected versus actual behavior:

When the cat API is used on APIs that support URL parameters like index names, then calling those endpoints with &h to get help results in an error

Steps to reproduce:

# works
GET _cat/shards?help
GET _cat/shards/test
# returns an exception
GET _cat/shards/test?help
@spinscale spinscale added :Data Management/CAT APIs Text APIs behind /_cat >bug labels Nov 17, 2017
@jyoti0208
Copy link

I would like to work on this.

@olcbean
Copy link
Contributor

olcbean commented Nov 23, 2017

hey @spinscale
I would like to have a go at this. I figured I will ask before doing the work, as the issue does not have an adoptme tag.
Thanks!

@olcbean
Copy link
Contributor

olcbean commented Nov 23, 2017

@jyoti0208 oh crap! I just now saw your earlier comment ( browser did not refresh properly ). Sorry for jumping up the queue :)

@spinscale
Copy link
Contributor Author

feel free to go ahead! Thanks a lot for working on this!

@zachio
Copy link

zachio commented Jan 23, 2018

I'm getting some broken cat urls when i use

http://thecatapi.com/api/images/get?format=xml&results_per_page=20

@jasontedor
Copy link
Member

This was explored in #27598 and I do not think that there is much that we should do here. The behavior would be odd if the index does not exist, or odd if there are unrecognized parameters in the request (do we ignore them? do we throw 404s? do we fail on the unrecognized parameters?). I think we should leave this as-is.

@olcbean
Copy link
Contributor

olcbean commented Jan 30, 2018

@jasontedor what about adding a short note in the docs that help should not be used with any other url params?

@jasontedor
Copy link
Member

@olcbean That would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/CAT APIs Text APIs behind /_cat
Projects
None yet
Development

No branches or pull requests

5 participants