Calling Secure Elasticsearch API from Custom Kibana Plugin

Hello Team,

Could you please help understand how to call secured elasticsearch (POST/PUT) api from custom kibana plugin.
Currently i am using callwithrequest to get and post the indexed data. but just need to understand when API's are secured with some auth method how can we call them using callwithrequest.

Thank you for your help and support.

Thank you,
Aditya

It sounds like you're doing it right. callwithrequest should pass through any HTTP headers that are required for auth against the target endpoint, so it should "just work".

1 Like

Thank you christophilus,
I will test this and will share the observations.

Thank you,
Aditya

Thank you christophilus,
It worked as it is, did not had to do anything to make it work.
Just one more query , how can we get the logged-in user information in the request or session.
any pointers or documentation to resolve the issue would help.

Thanks for your help and support.

Thank you,
Aditya

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