If you want to connect Xsoar with Elastic Search, Xsoar already has Elastic Integration, all you need to do here is to enter the Server URL you get from Elastic into the integration. Afterwards, you can assign them to a playbook you want. You don't need to pull any special API or anything. This video may work for you;