How to get Json data from elastic through URL?


I am using a report generating application. I want to get data from elastic and create report.

I tried to connect to elastic as a data source through basic http authentiction But i got an authentication error.

When I tried the same by disabling X-pack, I got Json data.

So how can i get Json data from elastic to 3rd party application with X-pack?

Moved to #x-pack

Sorry, i didn't understand. I am already using x-pack

I just moved your question to #x-pack group instead of #elasticsearch where you initially posted it. That was not an answer :slight_smile:


if you install xpack, the security feature is enabled by default - thus you need to authenticate. If you dont want to do that, you can set false and you are good to go.


When you include the username and password in the URL, it is the client's job to process it and turn it into a Basic authentication header in the HTTP request.

That is, the elastic:changeme part of your URL never gets sent directly to Elasticsearch, but need to be specially handled within your 3rd party application.

If you paste that URL into curl you should find that it works fine.
e.g. I just ran curl --verbose 'http://elastic:changeme@localhost:9200/' and got the correct result, because curl is handling the embedded parameters.

My best guess is that your 3rd party application does not handling embedded username+password in URLs. You will need to talk to the vendor of that application about that.

Okay. Thanks for help

Thanks for help. I need to check that

Okay. Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.