In previous version of Kiabana I was able to do ajax post requests to the elasticsearch instance by using the following URL structure: http://localhost:5601/cdp/elasticsearch/_msearch
and pass in my query object data. This does not seem to work in Kiabana 7.10 as it gives me a 404 error. In the dev tools I can post my query request and it returns the data so I know my query format is correct. Anyone know what has changed in 7.10 to cause this to stop working or know what I need to change to get this to work in Kibana 7.10? Here's my ajax request:
return $.ajax({
url: URL.msearch(),
data: dbQuery.toESQueryString(),
headers: { 'content-type': 'application/x-ndjson' },
method: 'POST'
});
Here's my query object. It gets a call to JSON.stringify()
in the dbQuery.toESQueryString()
function:
{"index":"es_data","ignore_unavailable":true}
{"timeout":"30000ms","size":0,"aggs":{"cats":{"terms":{"field":"cntry_name","size":5000}}}}