How to access aggregations from within custom request handler

Is it possible to access the aggregations from within a custom visualization request handler? I'm currently not seeing the aggs object contained within the object that is passed into the custom request handler. I'm trying to build a custom Elasticsearch query from within the request handler but I need access to the aggregations to do this. I'm currently using Kibana 7.5.2.

Anyone have an answer for this? I thought it was a pretty straight forward question. How do you get access to the aggregations from within a custom request handler? Thanks!

@jbudz can you shed some light here ?

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

Just wanted to leave a note that it looks like this was removed for custom request handlers as part of migration efforts in our visualization infrastructure, but I don't believe we did this intentionally (in short: it's a bug). There has been a lot of churn in our visualizations which I explain in more detail in Request/Response handlers in visualizations and the corresponding Github issue.

At the moment I believe this would affect any plugins in 7.5-7.7 registering visualizations which are also using a custom requestHandler that needs access to aggs.

I'm working to get this re-added soon... Here's the Github issue if you'd like to follow along: https://github.com/elastic/kibana/issues/67916

1 Like

Following up to confirm that this issue has been resolved -- we're currently expecting it to be available starting in 7.8.2

1 Like