# Kibana visualization and foreach?

**URL:** https://discuss.elastic.co/t/kibana-visualization-and-foreach/110708
**Category:** Kibana
**Created:** [December 7, 2017, 3:39pm UTC](https://discuss.elastic.co/t/kibana-visualization-and-foreach/110708 "2017-12-07T15:39:51Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)
#### Post date: [December 9, 2017, 12:17am UTC](https://discuss.elastic.co/t/kibana-visualization-and-foreach/110708/2 "2017-12-09T00:17:31Z")

</div>

Hi Brandon,

The foreach processor is for preprocessing documents before they're indexed in Elasticsearch, and no such functionality exists in Kibana. I'm a bit confused about what you're asking for here.

> Now, for each meetingId I'd like to create a visualization that presents data of the users

It sounds like you want to dynamically generate visualizations based on the data set returned by a query. Kibana doesn't support this in the UI, but you could write some scripts or use automation tools to do this. Here's some information about the API you'll need to hit: [https://github.com/elastic/kibana/pull/11632](https://github.com/elastic/kibana/pull/11632).

You can GET a visualization using this API to see what kind of payload you'd need to send to create it. For example:

```auto
curl -H "Content-Type: application/json" -H "kbn-xsrf: true" http://localhost:5601/api/saved_objects/visualization/{visualization ID}

```

You can find the visualization ID by opening up the visualization in Kibana and looking for the ID in the URL:

```auto
http://localhost:5601/app/kibana#/visualize/edit/{visualization ID}

```

Hope this helps,  
CJ

---

_[View the full topic](https://discuss.elastic.co/t/kibana-visualization-and-foreach/110708)._
