I have saved objects that I am trying to import into 2 different spaces. This worked under kibana 7, but is broken under kibana 8.
I use s/spacename in the url when working with the different spaces
Importing into the first space works and I see the dashboards in elastic
I get a 'conflict' error when I try to import into the second space
I found the documentation that explains the difference between version 7 and 8 with respect to saved objects and multiple spaces.
I have tried adding 'initialNamespaces' to the payload during the import and got past the error, but I still don't see the dashboards in the second space
I see that kibana defines saved object dashboards as 'multiple-isolated' and the documentation says the 'initialNamespaces' option can only be used to specify a single space, and the "All spaces" identifier ('*') is not allowed. Does this mean I really can not import a save object into multiple spaces?
Does anyone have example code that does something like this successfully or explain to me what needs to be done?
Welcome to the community! I assume you have been trying to follow this blog when you make reference to initialNamespaces?
Have you managed to import the dashboard saved object initially? I wonder if you can make use of the copy saved objects to another space capability to produce the copies you need. You can either use the action in Kibana or make use of the copy saved objects API instead.
Thanks for the suggestion. I will try this, but can you give me more information about how 'initialNamespaces' is supposed to be used and how I can have a dashboard be referenced by multiple spaces (if this is possible)?
I've been doing a bit of digging into existing GitHub issues and it looks to me that for shareable types such as DataViews initialNamespaces can have multiple values as those objects can be made available in multiple spaces, but Dashboards as you correctly identify are an isolated type and therefore not shareable across spaces and you can only specify a single space option. The docs cover it here as you've mentioned.
I see a couple of issues have been raised to request the feature for not just dashboards but also rules which have the same issue. It's something that looks to be in the works, but I'm not sure when the feature will be available. So for the moment it looks like copying to different spaces is the closest way as multiple spaces for dashboards isn't available.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.