# Kibana REST api with non default space

**URL:** <https://discuss.elastic.co/t/kibana-rest-api-with-non-default-space/181400>\
**Category:** Kibana\
**Created:** [May 16, 2019, 1:01pm UTC](https://discuss.elastic.co/t/kibana-rest-api-with-non-default-space/181400 "2019-05-16T13:01:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jussi\_Ritamaki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jussi_ritamaki/32/46307_2.png) [@Jussi\_Ritamaki](https://discuss.elastic.co/u/Jussi_Ritamaki)\
**Post date:** [May 16, 2019, 1:01pm UTC](https://discuss.elastic.co/t/kibana-rest-api-with-non-default-space/181400/1 "2019-05-16T13:01:35Z")

</div>

Hi, I'm trying to get dashboard to safety using Kibana 7.1 dashboard export API (would also like to import), but seems that I can only get the dashboards from the default space. I can't find any parameter from the documentation that would allow me to set the space where the dashboards are being exported from.

Tried also to do the curl with user that has no privileges to default space with no luck.

I know the Rest API is still experimental so is it so that this is not currently possible?

What I want to achieve is to get at least my visualizations exported to git repo and to be able to restore from there (even to another kibana). Is there some better way to do this than REST Api (I prefer not click export/import for every single space).

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [May 16, 2019, 1:06pm UTC](https://discuss.elastic.co/t/kibana-rest-api-with-non-default-space/181400/2 "2019-05-16T13:06:59Z")

</div>

Hey @Jussi_Ritamaki,

Hmm, I believe you just need to prefix `_import/_export` API URL with the space you want to export from/import to:

```auto
POST /s/my-awesome-space/api/saved_objects/_import

```

Best,  
Oleg

---

<div class="post-metadata">

**Author:** ![Jussi\_Ritamaki](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jussi_ritamaki/32/46307_2.png) [@Jussi\_Ritamaki](https://discuss.elastic.co/u/Jussi_Ritamaki)\
**Post date:** [May 16, 2019, 5:03pm UTC](https://discuss.elastic.co/t/kibana-rest-api-with-non-default-space/181400/3 "2019-05-16T17:03:25Z")

</div>

Yes that works.

Thank you.

---

<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:** [June 13, 2019, 5:03pm UTC](https://discuss.elastic.co/t/kibana-rest-api-with-non-default-space/181400/4 "2019-06-13T17:03:26Z")

</div>

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