# Importing Kibana saved objects without CURL

**URL:** <https://discuss.elastic.co/t/importing-kibana-saved-objects-without-curl/271440>\
**Category:** Kibana\
**Created:** [April 27, 2021, 8:33pm UTC](https://discuss.elastic.co/t/importing-kibana-saved-objects-without-curl/271440 "2021-04-27T20:33:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kudster](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@kudster](https://discuss.elastic.co/u/kudster)\
**Post date:** [April 27, 2021, 8:33pm UTC](https://discuss.elastic.co/t/importing-kibana-saved-objects-without-curl/271440/1 "2021-04-27T20:33:06Z")

</div>

Hi i'm currently trying to make a kibana api call using pascal however i'm not sure how to convert the CURL request. This curl request is working from command prompt.

curl -X POST "localhost:5601/api/saved\_objects/\_import?createNewCopies=true" -H "kbn-xsrf: true" --form file=@export.ndjson

However when I try to make an http request with pascal its returning an error, I don't know how to use the --form through code. The method should be similar with other http requests as well so I was wondering in anyone know how to do it.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shustov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikhail_shustov/32/49186_2.png) [@Mikhail\_Shustov](https://discuss.elastic.co/u/Mikhail_Shustov)\
**Post date:** [April 30, 2021, 1:06pm UTC](https://discuss.elastic.co/t/importing-kibana-saved-objects-without-curl/271440/2 "2021-04-30T13:06:06Z")

</div>

`api/saved_objects/_import` expects `multipart/form-data` content type.

> kibana api call using pascal

I've never worked with Pascal, but I'm sure there is an HTTP client with form `multipart/form-data` support. I found several code snippets [here](https://forum.lazarus.freepascal.org/index.php?topic=47220.0)

---

<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:** [May 28, 2021, 1:06pm UTC](https://discuss.elastic.co/t/importing-kibana-saved-objects-without-curl/271440/3 "2021-05-28T13:06:20Z")

</div>

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