# How to download opensearch dashboard

**URL:** <https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989>\
**Category:** OpenSearch\
**Created:** [June 20, 2022, 3:31pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989 "2022-06-20T15:31:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [June 20, 2022, 3:31pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/1 "2022-06-20T15:31:57Z")

</div>

Hello team,

Would like to download/export the open search dashboard template from the existing environment. Same template or file can import it to another opensearch dashboard.

Wanted to know is there any file which can be downloaded and then it can be utilised in any of the opensearch dashboard environment?

Any help would be highly appreciated.

Thanks,

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [June 20, 2022, 3:50pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/2 "2022-06-20T15:50:53Z")

</div>

Hello,  
I wish I could help you but I really have no idea what you are talking about.

Can you give more details? Explain furthermore ?

Are you talking about dashboards inside OpenSearch Dashboards ?  
How to import/export saved objects ?

Thi

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [June 20, 2022, 5:06pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/3 "2022-06-20T17:06:10Z")

</div>

Hello @ThibaudF,

Thank you for your response…

Yes.

Basically what I am trying to do is I have created a docker-compose file through which the opensearch an opensearch dashboard is getting created. I have created a sample dashboard for that environment.

Now I have created ansible roles through which I am going to deploy the opensearch an opensearch dashboard so I just wanted to use existing dashboard which have created as an example so that will be using the same dashboard in future deployment during using ansible roles.

Please do let me know in case of any questions.

Thanks

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [June 21, 2022, 8:23am UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/4 "2022-06-21T08:23:54Z")

</div>

Dashboards are exportable via UI/API, you will have JSON so you can use import API during your ansible deployment (after cluster is UP and READY)  
Use your web debug console, F12 / CTRL+C and when you export you can get the API used and adapt/modify it.

You can also restore .kibana index (which includes the tenant name)

Thi

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [June 21, 2022, 9:13am UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/5 "2022-06-21T09:13:42Z")

</div>

Thank you so much @ThibaudF

Let me try and update you once done …

Thanks

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [June 21, 2022, 9:56am UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/6 "2022-06-21T09:56:03Z")

</div>

Edit : In your case, you need the Import API more than the Export API 😉

Post your results here, it might help others

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 11:29am UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/7 "2022-07-18T11:29:41Z")

</div>

Hello @ThibaudF

Thank you for your response. Actually I am trying to import the exported dashboard using the following command to check whether it is working or not.

curl -X POST [http://localhost:5601/api/saved\_objects/\_import](http://localhost:5601/api/saved_objects/_import) -H “kbn-xsrf: true” --form file=@dashboard.ndjson

curl -X POST “[http://localhost:5601/\_plugin/kibana/api/saved\_objects/\_import](http://localhost:5601/_plugin/kibana/api/saved_objects/_import)” -H “kbn-xsrf:true” --form file=@dashboard.ndjson

Unfortunately I am getting an error message 404 page not found.  
{“statusCode”:404,“error”:“Not Found”,“message”:“Not Found”}

Can you please suggest how to import it using curl command?

Thank you.

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [July 18, 2022, 12:09pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/8 "2022-07-18T12:09:47Z")

</div>

Hi !  
Have you tried the parameter `?overwrite=true` ?  
`curl -X POST http://localhost:5601/api/saved_objects/_import?overwrite=true -H “kbn-xsrf: true” --form file=@dashboard.ndjson`

Does the dashboard.ndjson exists ?  
Check the current directory of the curl command

Don’t forget to add the `securitytenant` header if you have multi-tenancy enabled

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 12:25pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/9 "2022-07-18T12:25:27Z")

</div>

Thank you for your response. Let me try and come back.

curl -X POST [http://localhost:5601/api/saved\_objects/\_import?overwrite=true](http://localhost:5601/api/saved_objects/_import?overwrite=true) -H “kbn-xsrf: true” --form file=@dashboard.ndjson → **No I have not tried it. Let me try and come back to you.**

Does the dashboard.ndjson exists ? → **Yes, it is available in my current directory from where I am executing the command.**

Don’t forget to add the `securitytenant` header if you have multi-tenancy enabled → **No multi-tenancy**

Thanks

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 12:29pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/10 "2022-07-18T12:29:05Z")

</div>

Tried with overwrite=true… Getting the following error message.

\*\*\* Closing connection 0\*\*  
**{“statusCode”:404,“error”:“Not Found”,“message”:“Not Found”}Note: Unnecessary use of -X or --request, POST is already inferred.**  
\*\*\* Failed to convert true” to ACE; string contains a disallowed character\*\*

\*\*\* Closing connection -1\*\*  
**curl: (3) Failed to convert true” to ACE; string contains a disallowed character**

☹

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [July 18, 2022, 12:30pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/11 "2022-07-18T12:30:33Z")

</div>

Try curl with `-vvvv` and post output

Do you have any authentication system ?  
Maybe you need to pass username/password

Have you checked the dashboard.ndjson permissions?

Seems that you are using wrong quote after true, erase and replace the quote  
Can you post your dashboard.ndjson content ?

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 12:55pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/12 "2022-07-18T12:55:34Z")

</div>

Do you have any authentication system ? → **No**  
Maybe you need to pass username/password

Have you checked the dashboard.ndjson permissions? → **made it 777 for now just for testing.**

Seems that you are using wrong quote after true, erase and replace the quote  
**curl -X POST [http://localhost:5601/api/saved\_objects/\_import?overwrite=true](http://localhost:5601/api/saved_objects/_import?overwrite=true) -H “kbn-xsrf:true” --form file=@dashboard.ndjson -vvv**

Can you post your dashboard.ndjson content ? → **Sorry about that**. ☹

Here is the output of verbose.  
Note: Unnecessary use of -X or --request, POST is already inferred.

- Trying localhost:5601…
- TCP\_NODELAY set
- Connected to localhost (localhost) port 5601 (#0)

> POST /api/saved\_objects/\_import?overwrite=true HTTP/1.1  
> Host: localhost:5601  
> User-Agent: curl/7.68.0  
> Accept: _/_  
> “kbn-xsrf:true”  
> Content-Length: 32005  
> Content-Type: multipart/form-data; boundary=------------------------d9a76dd9d9670fad  
> Expect: 100-continue

- Mark bundle as not supporting multiuse  
\< HTTP/1.1 400 Bad Request
- no chunk, no close, no size. Assume close to signal end  
\<
- Closing connection 0

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 1:09pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/13 "2022-07-18T13:09:59Z")

</div>

FYI, I am using docker container for opensearch-dashaboard and executing the command from host to import the dashboard.

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [July 18, 2022, 1:16pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/14 "2022-07-18T13:16:22Z")

</div>

Can you try to add single quotes around file :  
`curl -X POST http://localhost:5601/api/saved_objects/_import?overwrite=true -H "kbn-xsrf: true" --form 'file=@dashboard.ndjson' -vvv`

Can you try some GET on /api/saved\_objects ?  
Like /api/saved\_objects/\_bulk\_get  
Edit : Sorry it was not a GET it’s a POST with bulk\_get  
So try a request like that : `/api/saved_objects/_find?type=dashboard&fields=title&fields=type`  
To check if GET requests are working correctly before POST  
Maybe your endpoint has a prefix  
I also have 404 not found if my routes/endpoints/URL are not correct

Have you exported the ndjson via API ? `/api/saved_objects/_export` endpoint

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 1:18pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/15 "2022-07-18T13:18:30Z")

</div>

Can you try to add single quotes around file :  
`curl -X POST http://localhost:5601/api/saved_objects/_import?overwrite=true -H "kbn-xsrf: true" --form 'file=@dashboard.ndjson' -vvv` → Let me try this out…

Can you try some GET on /api/saved\_objects ? → Let me try this out  
Like /api/saved\_objects/\_bulk\_get

Have you exported the ndjson via API ? `/api/saved_objects/_export` endpoint → I have exported using GUI… Let me try export using api and update you…

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 1:29pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/16 "2022-07-18T13:29:27Z")

</div>

Not able to export the dashboard using API getting 404 error, as same as import.  
{“statusCode”:404,“error”:“Not Found”,“message”:“Not Found”}

No luck with get objects.

# curl -X GET [http://localhost:5601/api/saved\_objects/\_bulk\_get](http://localhost:5601/api/saved_objects/_bulk_get) -vvv

Note: Unnecessary use of -X or --request, GET is already inferred.

- Trying localhost:5601…
- TCP\_NODELAY set
- Connected to localhost (localhost) port 5601 (#0)

> GET /api/saved\_objects/\_bulk\_get HTTP/1.1  
> Host: localhost:5601  
> User-Agent: curl/7.68.0  
> Accept: _/_

- Mark bundle as not supporting multiuse  
\< HTTP/1.1 404 Not Found  
\< osd-name: 65cfd20f3f38  
\< content-type: application/json; charset=utf-8  
\< cache-control: private, no-cache, no-store, must-revalidate  
\< content-length: 60  
\< Date: Mon, 18 Jul 2022 13:26:06 GMT  
\< Connection: keep-alive  
\< Keep-Alive: timeout=120  
\<
- Connection #0 to host localhost left intact  
{“statusCode”:404,“error”:“Not Found”,“message”:“Not Found”}

Thanks.

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [July 18, 2022, 1:31pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/17 "2022-07-18T13:31:13Z")

</div>

Yes sorry try again without \_bulk\_get  
GET `/api/saved_objects/_find?type=dashboard&fields=title&fields=type`

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 1:48pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/18 "2022-07-18T13:48:42Z")

</div>

This is what I got after executing the below command.

```auto
# curl -X GET http://localhost:5601/api/saved_objects/_find?type=dashboard&fields=title&fields=type -vvv
[1] 1067037
[2] 1067038
{"statusCode":404,"error":"Not Found","message":"Not Found"}-vvv: command not found
[1]- Done curl -X GET http://localhost:5601/api/saved_objects/_find?type=dashboard
[2]+ Done fields=title

```

---

<div class="post-metadata">

**Author:** ![ThibaudF](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/thibaudf/32/31_2.png) [@ThibaudF](https://forum.opensearch.org/u/ThibaudF)\
**Post date:** [July 18, 2022, 1:53pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/19 "2022-07-18T13:53:42Z")

</div>

Put `-vvvv` before `-X GET`

Try to make GET requests work first  
Maybe the API endpoint changed ?

Try `/api/status`

Normally it’s still the same : [Can we use Kibana REST API's to create the dashboards Programmatically in OpenSearchDashboard - #4 by jong](https://forum.opensearch.org/t/can-we-use-kibana-rest-apis-to-create-the-dashboards-programmatically-in-opensearchdashboard/7397/4)

---

<div class="post-metadata">

**Author:** ![sabil](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@sabil](https://forum.opensearch.org/u/sabil)\
**Post date:** [July 18, 2022, 2:08pm UTC](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989/20 "2022-07-18T14:08:27Z")

</div>

```auto
* Trying localhost:5601...
* TCP_NODELAY set
* Connected to localhost (localhost) port 5601 (#0)
> GET /api/saved_objects/status?type=dashboard HTTP/1.1
> Host: localhost:5601
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< osd-name: 65cfd20f3f38
< content-type: application/json; charset=utf-8
< cache-control: private, no-cache, no-store, must-revalidate
< content-length: 60
< Date: Mon, 18 Jul 2022 14:06:14 GMT
< Connection: keep-alive
< Keep-Alive: timeout=120
<
* Connection #0 to host localhost left intact
{"statusCode":404,"error":"Not Found","message":"Not Found"}
[1]- Done curl -vvvv -X GET http://localhost:5601/api/saved_objects/status?type=dashboard
[2]+ Done fields=title

```

Tried with /api/status still not working… Not sure, what is missing…

Thanks.

[Next page](https://forum.opensearch.org/t/how-to-download-opensearch-dashboard/9989.md?page=2)
