Elasticsearch is built with known username & password and need to access with java api

I have built and up an elasticsearch on my computer. And set the

xpack.security.enabled: true
xpack.security.authc.api_key.enabled: true

to enable basic security. The elastic username password is also generated automatically.
Now I need to access the with java API, how can I do that? If any example or demo provided is better.


Have a look at:


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