# Synchronization of data between two spaces

**URL:** <https://discuss.elastic.co/t/synchronization-of-data-between-two-spaces/306851>\
**Category:** Kibana\
**Created:** [June 10, 2022, 7:30am UTC](https://discuss.elastic.co/t/synchronization-of-data-between-two-spaces/306851 "2022-06-10T07:30:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduhernandezm](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@eduhernandezm](https://discuss.elastic.co/u/eduhernandezm)\
**Post date:** [June 10, 2022, 7:30am UTC](https://discuss.elastic.co/t/synchronization-of-data-between-two-spaces/306851/1 "2022-06-10T07:30:34Z")

</div>

Good morning,

I have the following doubt. In my Kibana (version 8) I have created a series of dashboards of the data of certain indices that are loaded daily. I have created this dashboard in the default space of Kibana.

On the other hand, I have created a new space, where only the dashboard can be viewed. I have carried out the process of copying the dashboards and the data views of the indexes from the source space to the new destination space. It has been copied correctly, and in the new space I can see the dashboards.

My question is, if these dashboards are updated daily with new data that is loaded into Kibana, do I have to manually copy the new data and dashboards from the source space to the destination space? Isn't there a way to keep the two slots in sync automatically?

He encontrado esta documentación en la que indican una forma de hacerlo a través de la API de Kibana. En este caso está para el copiado de los dashboards, pero, como copio usando la API un data view donde esta todo el contenido de datos para generar las gráficas?

> **[Copy saved objects to space API | Kibana Guide \[8.2\] | Elastic](https://www.elastic.co/guide/en/kibana/8.2/spaces-api-copy-saved-objects.html)**
>
> Conceptual and step-by-step procedures for using runtime fields, scripted fields, and field formatters.

Thanks in advaced

---

<div class="post-metadata">

**Author:** ![eduhernandezm](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@eduhernandezm](https://discuss.elastic.co/u/eduhernandezm)\
**Post date:** [June 10, 2022, 11:04am UTC](https://discuss.elastic.co/t/synchronization-of-data-between-two-spaces/306851/2 "2022-06-10T11:04:59Z")

</div>

Thank you very much for the reply.

I've been looking around, and have built the following to do what I'm thinking of using the Kibana API and copy saved object methods.

This is the command that I try to launch from the command line:

curl -d '{  
"objects": [{  
"type": "dashboard",  
"id": "91ccfd10-d516-11ec-9207-e138dd6bc778"  
}],  
"spaces": "test",  
"includeReferences": true,  
"overwrite": true  
}' -H "kbn-xsrf: true" -X POST --noproxy '\*' --user user:pass [http://localhost:5601/kibana/api/spaces/\_copy\_saved\_objects](http://localhost:5601/kibana/api/spaces/_copy_saved_objects)

With this, what I am doing is copying the dashboard with the identifier 91\*\*\* that is in the default space that kibana creates to the space called "test" and that includes the references. I understand that includeReferences will also copy the data view that the dashboard uses to display the data. If I run this curl, I get this on the screen:

{"statusCode":400,"error":"Bad Request","message":"[request body.spaces]: expected value of type [array] but got [undefined]"}

I'm doing something wrong on this call.

Any recommendation

Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 14, 2022, 5:44am UTC](https://discuss.elastic.co/t/synchronization-of-data-between-two-spaces/306851/3 "2022-06-14T05:44:57Z")

</div>

> [@eduhernandezm](#):
>
> My question is, if these dashboards are updated daily with new data that is loaded into Kibana, do I have to manually copy the new data and dashboards from the source space to the destination space? Isn't there a way to keep the two slots in sync automatically?

Nope, the underlying data in the indices will be visible to any dashboard that reads from them.

---

<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:** [July 12, 2022, 5:45am UTC](https://discuss.elastic.co/t/synchronization-of-data-between-two-spaces/306851/4 "2022-07-12T05:45:10Z")

</div>

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