# Upload local csv file to server via rest API

**URL:** <https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249>\
**Category:** Uncategorized\
**Created:** [June 6, 2018, 2:06am UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249 "2018-06-06T02:06:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shachar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/shachar/32/797_2.png) [@shachar](https://community.dremio.com/u/shachar)\
**Post date:** [June 6, 2018, 2:06am UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249/1 "2018-06-06T02:06:56Z")

</div>

Hi,

I have created bunch of CSV files on the Dremio Server  
Can I upload them locally via rest api  
Or the only way is to copy them manually via the client

I try to create a source via authenticated post curl:

curl -X POST ‘[http://localhost:9047/apiv2/sources](http://localhost:9047/apiv2/sources)’ -H ‘Accept-Encoding: gzip, deflate, br’ -H “authorization:\_dremio$TOKEN” -H ‘Accept: _/_’ -H ‘Connection: keep-alive’ --compressed

and get:

{“errorMessage”:“Something went wrong”,“moreInfo”:“HTTP 405 Method Not Allowed”}

can’t find it in the documentation

any idea ?

---

<div class="post-metadata">

**Author:** ![doron](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/doron/32/294_2.png) [@doron](https://community.dremio.com/u/doron)\
**Post date:** [June 6, 2018, 4:35am UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249/2 "2018-06-06T04:35:17Z")

</div>

Hi,

You can create datasets using the [API described here.](http://docs.dremio.com/rest-api/catalog/endpoints.html#create-a-new-catalog-entity). However there is currently no way to upload CSV files using our public API.

You could create a NAS source and point it at the directory containing the CSV files. You can then promote the files using the API ([described here](http://docs.dremio.com/rest-api/catalog/endpoints.html#promote-a-folder-or-file-to-a-dataset)) or using the UI. If all CSV files have the same schema, you can also promote the container folder.

---

<div class="post-metadata">

**Author:** ![shachar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/shachar/32/797_2.png) [@shachar](https://community.dremio.com/u/shachar)\
**Post date:** [June 6, 2018, 10:40pm UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249/3 "2018-06-06T22:40:20Z")

</div>

Thanks Doron  
For the quick response  
Will do!  
(P.S. love you hair)

---

<div class="post-metadata">

**Author:** ![monocongo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/monocongo/32/2875_2.png) [@monocongo](https://community.dremio.com/u/monocongo)\
**Post date:** [October 23, 2020, 2:20am UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249/4 "2020-10-23T02:20:05Z")

</div>

> [@doron](#):
>
> However there is currently no way to upload CSV files using our public API.

Is this still the case? If not then is there an example? I can’t find much in the way of a simple example for my use case, I just need to use CSV files on an S3 bucket as a dataset/table in Dremio. If this is not possible then I can download the files using `boto3` and then upload to Dremio as a File entity type and then promote to a Dataset?

Thanks for any suggestions!

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 23, 2020, 5:59am UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249/5 "2020-10-23T05:59:37Z")

</div>

@monocongo

When you just have 1 or 2 files upload is ok but to promote a bunch of files, promoting the S3 folder via a S3 source would be ideal

Thanks  
Bali

---

<div class="post-metadata">

**Author:** ![jrdunson](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jrdunson](https://community.dremio.com/u/jrdunson)\
**Post date:** [May 5, 2023, 8:16pm UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249/6 "2023-05-05T20:16:16Z")

</div>

Hey I know this is old, the API link is broken (404)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [May 5, 2023, 11:52pm UTC](https://community.dremio.com/t/upload-local-csv-file-to-server-via-rest-api/1249/7 "2023-05-05T23:52:07Z")

</div>

@jrdunson Here is the link to the docs page for the Catalog entity

[https://docs.dremio.com/software/rest-api/catalog/](https://docs.dremio.com/software/rest-api/catalog/)
