Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [visualization, doc]" error


I followed the topic of Import a visualisation using API. 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 ??


it's very likely that you are trying to import a visualization from pre 6.0 into 6.0? Since we had some breaking changes in the format of those saved objects you cannot do that right now. If you want to update 5.x version to 6.0, you should rather upgrade to 5.6 and use the migration assistant (in x-pack basic) or do the manual steps as outlined in the migration docs.


But I'm using Kibana 6.2.4 not 5.x


where does the visualization come from, that you are trying to import? Because the error looks a lot, like this is not a 6.x visualization you are trying to import?


Hello ,

yes Kibana 6.2.4,
I'm reading the topics that are related to upgrading because it seems that the error is related to. But I didn't understand why this is problem in my case because I'm trying to import data from kibana 6.2.4 to kibana 6.2.4

Okay that's kind of weird, because no saved object inside Kibana 6.2.4 should have that visualization type anymore.

Could you please paste the saved object you are trying to import via that API, and also explain in which way you exported that saved object from Kibana?

"_id": "debe16b0-6277-11e8-9068-2ffa1f6e8923",
"_type": "visualization",
"_source": {
"title": "percentiles_senario",
"visState": "{"title":"percentiles_senario","type":"line","params":{"type":"line","grid":{"categoryLines":false,"style":{"color":"#eee"}},"categoryAxes":[{"id":"CategoryAxis-1","type":"category","position":"bottom","show":true,"style":{},"scale":{"type":"linear"},"labels":{"show":true,"truncate":100},"title":{}}],"valueAxes":[{"id":"ValueAxis-1","name":"LeftAxis-1","type":"value","position":"left","show":true,"style":{},"scale":{"type":"linear","mode":"normal"},"labels":{"show":true,"rotate":0,"filter":false,"truncate":100},"title":{"text":"Percentile ranks of response_duration"}}],"seriesParams":[{"show":true,"mode":"stacked","type":"area","drawLinesBetweenPoints":true,"showCircles":true,"lineWidth":3,"data":{"id":"2","label":"Percentile ranks of response_duration"},"valueAxis":"ValueAxis-1"}],"addTooltip":true,"addLegend":true,"legendPosition":"right","times":[],"addTimeMarker":false},"aggs":[{"id":"2","enabled":true,"type":"percentile_ranks","schema":"metric","params":{"field":"response_duration","values":[50,90,95,99,100]}},{"id":"3","enabled":true,"type":"significant_terms","schema":"segment","params":{"field":"event.keyword","size":20}}]}",
"uiStateJSON": "{"vis":{"colors":{"Percentile rank 90 of \"response_duration\"":"#3F6833","Percentile rank 50 of \"response_duration\"":"#BF1B00","Percentile rank 95 of \"response_duration\"":"#0A437C","Percentile rank 99 of \"response_duration\"":"#70DBED"}}}",
"description": "",
"savedSearchId": "Kibana",
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{"index":"efbaafb0-625d-11e8-9068-2ffa1f6e8923","filter":[],"query":{"query":"","language":"lucene"}}"
"_meta": {
"savedObjectVersion": 2

this is the exported data. And I imported It manually from Kibana Saved Objects. Then I copy and paste the content of imported file to the file my-viz.json and I used the cmd :

curl -H 'Content-Type: application/json' -X PUT --data @my-viz.json ''


yeah those saved objects cannot be pushed directly to the Elasticsearch index as you are trying. They are meant to be imported via Kibana again, which will take care of modeling the appropriate ES document for that.

There is currently an experimental (yet undocumented) API, that allows you to import those saved objects again into Kibana. You can find information about this API in this pull request. This (or using the UI) are the only ways to import those saved objects again.


Ok it's clear now thank you very much :wink:


I'm trying to import my dashboard in kibana via : curl -XPOST -H 'kbn-xsrf:true' -H 'Content-type:application/json' -d @my-viz.json But I got this error {"statusCode":400,"error":"Bad Request","message":"\"value\" must be an object","validation":{"source":"payload","keys":["value"]}}% I knew that this is related to my json file but I'm not able to fix it
Have you any idea about this error and how can we fix it ??

Thank you

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