What is the content of @empty-tsrequest.xml ?
There is nothing in the file. I just took the example from the Tableau REST API Reference page. I get the same error with or without the -d <file>.
What I am trying to achieve is, tag our workbooks like "Full", "incremental", etc, run the python script to retrieve all the workbook IDs that fall under X tag, then run the Update Workbook Now API.
I have a custom script that does this already, but failed with the error above. So I took the basic method curl example to see if the issue is with my script or the API. I'm thinking its the API, but maybe I am missing something.
Regarding the error "Malformed XML" I'm guessing that your XML file might be missing some information.
I was able to figure out the issue. Turns out the "empty-tsrequest.xml" is required but so is adding -H "Content-Type: text/xml" into the curl statement. This appears to be missing in the Tableau example in their reference page.
Final working curl:
curl "http://<site>/api/3.0/sites/<site ID>/workbooks/<workbook ID>/refresh" -X POST -H "Content-Type: text/xml" -H "X-Tableau-Auth:<token>" -d @empty-tsrequest.xml"
Contents of empty-tsrequest.xml