-
1. Re: REST API calls to publish a datasource responds with 502 error
Matt Ryan Oct 28, 2019 1:01 PM (in response to Matt Ryan)Interestingly I am now getting a response code of 500. Not sure what i did, not sure if i moved ahead or backwards towards my goal.
Below is a snippet of the request, i have the line spacing right as far as i can tell.
--===1572290236863===
Content-Disposition: name="request_payload"
Content-Type: text/xml
--===1572290236863===
Content-Disposition: name="tableau_file"; filename="Extact.hyper"
Content-Type: application/octet-stream
<contents of Hyper extract file>
--===1572290236863===--
-
2. Re: REST API calls to publish a datasource responds with 502 error
Matt Ryan Oct 28, 2019 2:12 PM (in response to Matt Ryan)Well, now I got it working at least throught the PUTs for the adding file parts. Seems it didn't like the boundary i was using (maybe the ===). I put a random string in there and things started to work. Either that or someone at Tableau Online is messing with me and fixing stuff
-
3. Re: REST API calls to publish a datasource responds with 502 error
Matt Ryan Oct 29, 2019 10:39 AM (in response to Matt Ryan)I will continue on with the 500 error I am now getting doing the final publish step (So this thread documents my full struggle through publishing a multipart datasource). I am able to do the file appends, but the finish call to publish is responding with the 500 code. It all seems to conform to the documentation to me, but apparently... not
java.lang.RuntimeException: Server returned HTTP response code: 500 for URL: https://prod-useast-a.online.tableau.com/api/3.5/sites/17162535-641d-4d6c-82ca-968ac9b24199/datasources?uploadSessionId=21659:20c48521b1e3408da42fbe8d64a7e85e-0:0&datasourceType=tds&overwrite=true
The payload with that call:
--12f71d3d4ae441caa0b38a5d4e0bde5e
Content-Disposition: name="request_payload"
Content-Type: text/xml
<tsRequest>
<datasource name="ZipCode">
<project id="03dab425-6ad8-450e-9dcf-167f95b47d5a"/>
</datasource>
</tsRequest>
--12f71d3d4ae441caa0b38a5d4e0bde5e--