Visualizations - elasticsearch/_cat/Indices not found

Using Kibana 7.3.2

I'm trying to create a plugin which would embed saved visualizations. I used the example plugin, and I'm getting the following exception from the embedder:

http://localhost:5601/epg/elasticsearch/_cat/indices?_=1574234938279&format=json&h=store.size&bytes=b
StatusCodeError {status: 404, displayName: "NotFound", message: "Not Found", path: "/_cat/indices", query: {…}, …}body: {statusCode: 404, error: "Not Found", message: "Not Found"}displayName: "NotFound"message: "Not Found"path: "/_cat/indices"query: {_: 1574234938279, format: "json", h: "store.size", bytes: "b"}response: "{"statusCode":404,"error":"Not Found","message":"Not Found"}"status: 404statusCode: 404toJSON: ƒ ()toString: ƒ ()stack: "Error: Not Found↵    at respond (webpack://%5Bname%5D/./node_modules/elasticsearch-browser/elasticsearch.angular.js?:19233:15)↵    at checkRespForFailure (webpack://%5Bname%5D/./node_modules/elasticsearch-browser/elasticsearch.angular.js?:19194:7)↵    at eval (webpack://%5Bname%5D/./node_modules/elasticsearch-browser/elasticsearch.angular.js?:19809:7)↵    at processQueue (webpack://%5Bname%5D/./node_modules/angular/angular.js?:17297:37)↵    at eval (webpack://%5Bname%5D/./node_modules/angular/angular.js?:17345:27)↵    at Scope.$digest (webpack://%5Bname%5D/./node_modules/angular/angular.js?:18482:15)↵    at Scope.$apply (webpack://%5Bname%5D/./node_modules/angular/angular.js?:18870:24)↵    at done (webpack://%5Bname%5D/./node_modules/angular/angular.js?:12776:47)↵    at completeRequest (webpack://%5Bname%5D/./node_modules/angular/angular.js?:13033:7)↵    at XMLHttpRequest.requestLoaded (webpack://%5Bname%5D/./node_modules/angular/angular.js?:12938:9)"__proto__: ErrorAbstract "Possibly unhandled rejection: {"msg":"Not Found","path":"/_cat/indices","query":{"_":1574234938279,"format":"json","h":"store.size","bytes":"b"},"statusCode":404,"response":"{\"statusCode\":404,\"error\":\"Not Found\",\"message\":\"Not Found\"}"}"

And if I check the http://localhost:5601/epg/elasticsearch/ url path, Kibana answers with a 404 error.
What should I do, to enable accessing the /elasticsearch path?

Hi @Gergely_Ujvari,

@joshdover will help.

Thanks.

This changed a little while back and we now do not expose all of Elasticsearch's APIs through that endpoint. The two endpoints available are:

  • /elasticsearch/_msearch
  • /elasticsearch/{index}/_search

There is another endpoint provided by the Console plugin that supports sending data to Elasticsearch, but it's not a drop in replacement.

Path: /api/console/proxy
Method: POST
Query parameters:

  • method: the HTTP method to send to Elasticsearch
  • path: the Elasticsearch API path

For example, you could make the request above by doing a POST request against this URL:
/api/console/proxy?method=GET&path=_cat/indices

If you want to include query parameters in the path sent to Elasticsearch, make sure to use encodeURIComponent to correctly encode them.