How to get Json data from elastic through URL?

Sir,

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.
(http://elastic:changeme@localhost:9200/csv/_search?pretty=1&size=65)

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:

Hey,

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 xpack.security.enabled: false and you are good to go.

--Alex

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.