How to make Elasticsearch API calls in Magento 2


I have a custom search field from which I want to access elasticsearch results, for that, I am making API calls to


http://<my_url>:9200/_search with


    "query": {
        "bool": {
            "must": [
                    "query_string": {
                        "default_field": "_all",
                        "query": "white"
            "must_not": [],
            "should": []
    "from": 0,
    "size": 10,
    "sort": [],
    "aggs": {}

this call is returning result in Postman, but it's not working when making calls from cURL, is there any other way of doing this?

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