# Import kibana saved object using API and Powershell (Invoke-WebRequest)

**URL:** <https://discuss.elastic.co/t/import-kibana-saved-object-using-api-and-powershell-invoke-webrequest/212929>\
**Category:** Kibana\
**Created:** [December 24, 2019, 8:36am UTC](https://discuss.elastic.co/t/import-kibana-saved-object-using-api-and-powershell-invoke-webrequest/212929 "2019-12-24T08:36:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orest\_Gulman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/orest_gulman/32/46463_2.png) [@Orest\_Gulman](https://discuss.elastic.co/u/Orest_Gulman)\
**Post date:** [December 24, 2019, 8:36am UTC](https://discuss.elastic.co/t/import-kibana-saved-object-using-api-and-powershell-invoke-webrequest/212929/1 "2019-12-24T08:36:25Z")

</div>

I can easily import sets of Kibana saved objects using API and curl:

```auto
curl -X POST "https://mykibana:443/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@file.ndjson -u admin:admin

```

What is the best approach to do that using Powershell (Invoke-WebRequest)?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [December 27, 2019, 11:42am UTC](https://discuss.elastic.co/t/import-kibana-saved-object-using-api-and-powershell-invoke-webrequest/212929/2 "2019-12-27T11:42:05Z")

</div>

Here is a link to a stackoverflow question that may help [https://stackoverflow.com/questions/40105458/how-to-use-the-curl-command-in-powershell](https://stackoverflow.com/questions/40105458/how-to-use-the-curl-command-in-powershell)

---

<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:** [January 24, 2020, 11:42am UTC](https://discuss.elastic.co/t/import-kibana-saved-object-using-api-and-powershell-invoke-webrequest/212929/3 "2020-01-24T11:42:47Z")

</div>

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