I am trying to upload a data source on my Tableau online instance via REST API.
I am able to 'Initiate file upload' and generate a session id. For 'Append to file upload' request, I am getting a 500 Internal server error. The documentation is not clear about how to attach .csv or .twbx files in the request. So I am attaching the .twbx/.csv file as form data in the request body. Please advise if I am doing anything wrong.
Is there any other way to upload .csv file via REST API into my workbook on Tableau online instance.
I've done only a little bit of work with the REST API, but my guess is the data source upload is expecting a Tableau packaged data source file. According to Publishing Resources-Tableau Server REST API - Tableau when uploading a data source the file has to be of type tds, tdsx or tde.