I have built an opensearch index and I am trying to search the data it contains. I managed to view the details of the index in the dev tools, in http://localhost:5601/app/dev_tools#/console. I want to be able to query the opensearch through REST API using postman. As a request, I am using GET for the URL http://localhost:5601/my_index/_search and the request body looks like this (the type is raw, JSON):
{
"query": {
"match": {
"product": "1234"
}
}
}
However, this results in the following error message:
{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}
What am I missing when creating the GET request?
Port 5601
is for the OpenSearch Dashboard. OpenSearch by default runs at port 9200
. So try http://localhost:9200/my_index/_search
instead.