How to upload CSV file using REST API?

2 followers
0
Avatar

 Hi.

 

According to these two methods:

  1. https://datameer.zendesk.com/hc/en-us/articles/204744560-How-to-Upload-a-File-Via-REST-API-Calls
  2. https://datameer.zendesk.com/hc/en-us/articles/208220653-How-to-Use-the-REST-API-to-Create-Start-and-Download-Data-for-File-Uploads

 

By using the Datameer REST API, everyone can upload or update CSV file. The first method in the above list describes  something about it. But I can't see where or how we can attach the CSV file to the CURL command. I have been supposing that Datameer is using another end-point to upload the data file or may be they are using a second parameter to set up. When I use the web wizard datameer is storing the file in the internal directory /mnt/datameer/das-data/fileuploads/

 

 

Best,

Ramiro

Ramiro Sandoval

Official comment

  • Avatar
    Joel Stewart

    There is a limitation that is mentioned in the documentation but nor in either of these articles. Specifically, the File Upload REST API for create is only available when Datameer is running on local mode (and the upload file is on the same filesystem as Datameer). This is documented REST API Import Job, Data Link, and File Upload - Create

    Generally, the File Upload option is recommended through the GUI. If there is a need to add files from external sources to Datameer through an API, I recommend using an Import Job through a Connection to a file share (SFTP for example). 

    0

1 comment

Please sign in to leave a comment.