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

Accessing the body response in HTTP searches #116

Closed
quintanilhar opened this issue Apr 6, 2017 · 1 comment
Closed

Accessing the body response in HTTP searches #116

quintanilhar opened this issue Apr 6, 2017 · 1 comment

Comments

@quintanilhar
Copy link
Contributor

Hey guys!

May we have access in body response to make some validations on that?

In my case, the status code is not enough because I'm using an old version of elastic search (1.7.1) that is not compatible with the supported version but I can query in this version using get requests directly, for example:

http://localhost:9200/nginxaccess-*/_count?q=status:%5B500%20TO%20600%5D%20AND%20@timestamp:%3E=now-10m%20AND%20urlpath:\/some-resource*

I have this response body:

{"count":0,"_shards":{"total":8,"successful":8,"failed":0}}

So I can validate the body with a simple regex like: count\":[1-9]+.

Thank you!

@kiwiz
Copy link
Contributor

kiwiz commented Apr 18, 2017

@quintanilhar I don't have time to look at this atm, but a PR would be welcome! You'd have to update this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants