# Automating visualization entries in .kibana index

**URL:** <https://discuss.elastic.co/t/automating-visualization-entries-in-kibana-index/147292>\
**Category:** Kibana\
**Created:** [September 5, 2018, 3:21am UTC](https://discuss.elastic.co/t/automating-visualization-entries-in-kibana-index/147292 "2018-09-05T03:21:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronchav](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@ronchav](https://discuss.elastic.co/u/ronchav)\
**Post date:** [September 5, 2018, 3:21am UTC](https://discuss.elastic.co/t/automating-visualization-entries-in-kibana-index/147292/1 "2018-09-05T03:21:30Z")

</div>

We have common log types across different application and I want to automate the creation of visualization entry in .kibana index from the template (exported json from kibana) I created.

I am following the post below but the last suggestion was, the only way to create a visualization is through kibana manual import. When I tried to perform PUT of my visualization data, I faced same issue: "Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [visualization, doc]"

> [@Rejecting mapping update to \[.kibana\] as the final mapping would have more than 1 type: \[visualization, doc\]" error](https://discuss.elastic.co/t/rejecting-mapping-update-to-kibana-as-the-final-mapping-would-have-more-than-1-type-visualization-doc-error/133557):
>
> Hello, I followed the topic of [Import a visualisation using API](https://discuss.elastic.co/t/import-a-visualisation-using-api/72488). But unfortunately I have this error Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [visualization, doc]" Any one have an Idea how can I solve this ?? Thanks

Is there any way now to automate the visualization entry creation and deal with more than 1 document type? I am using 6.3.2 version. Please advise

---

<div class="post-metadata">

**Author:** ![Ben\_Chaabene\_Wissem](https://avatars.discourse-cdn.com/v4/letter/b/838e76/32.png) [@Ben\_Chaabene\_Wissem](https://discuss.elastic.co/u/Ben_Chaabene_Wissem)\
**Post date:** [September 5, 2018, 9:48am UTC](https://discuss.elastic.co/t/automating-visualization-entries-in-kibana-index/147292/2 "2018-09-05T09:48:39Z")

</div>

Hello,  
I faced the same issue as you, and I came up with using [Bulk API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html). You should carefully read the documentation because you should know how you split the metadata fields and the data fields.

---

<div class="post-metadata">

**Author:** ![ronchav](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@ronchav](https://discuss.elastic.co/u/ronchav)\
**Post date:** [September 6, 2018, 4:11am UTC](https://discuss.elastic.co/t/automating-visualization-entries-in-kibana-index/147292/3 "2018-09-06T04:11:38Z")

</div>

I find a work around. I created templates and inject the values automatically per application and log type. Once the visualization json is ready, for the moment I import it manually and select the targeted index.

My end goal is to automate it using REST call via POST method, but I am currently facing some challenges at this point, if I can replicate the way kibana form the POST request, my issue will be solved.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 4, 2018, 4:11am UTC](https://discuss.elastic.co/t/automating-visualization-entries-in-kibana-index/147292/4 "2018-10-04T04:11:40Z")

</div>

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