The aggregations key is missing from the response, check your permissions for this request

PFB the reponse I get when running command in server directly :

{

"cluster_name" : "docker-cluster",

"status" : "yellow",

"timed_out" : false,

"number_of_nodes" : 1,

"number_of_data_nodes" : 1,

"active_primary_shards" : 686,

"active_shards" : 686,

"relocating_shards" : 0,

"initializing_shards" : 0,

"unassigned_shards" : 685,

"delayed_unassigned_shards" : 0,

"number_of_pending_tasks" : 0,

"number_of_in_flight_fetch" : 0,

"task_max_waiting_in_queue_millis" : 0,

"active_shards_percent_as_number" : 50.036469730124

}

I didn't see any specific error in elasticsearch logs when running the command.

That looks good, now can you run the command from the server instance running kibana?

PFB the response when I run the command on kibana server instance :
{"statusCode":404,"error":"Not Found","message":"Not Found"}

Also I get this error log : error_log_kibana

We need ot figure out how to get the same response running the command from the elasticsearch server instance as the kibana server instance. I'm going to try some things on my local machine. How do you have kibana and elasticsearch deployed?

It seems to me that the kibana results you're posting are from kibana rather than the command line of the server running kibana. Its important to run it from the command line to determine whether this is a networking problem or a kibana config problem.