问题
Has anybody found a way to spoof the requests that tableau desktop makes when publishing a report? I obviously know that they do not provide an API, but it seems like it should be pretty straightforward to just authenticate, and then POST the workbook. Has anybody found a way to do this? I publish a few workbooks very regularly (with minor changes that I can make using sed/awk) and I would like to set up a script to automate the process.
回答1:
No need to reverse-engineer the POST - you can use the TabCmd.exe
console app to publish the workbook to Server:
tabcmd.exe login -u username -p password -s http://serverlocation
tabcmd.exe publish -n "c:\path\to\SomeWorkbook.twbx"
Batch this puppy up and you have an easy way to publish.
BTW, if you don't have TabCmd
on your box, copy it from the \bin
folder of server, along with the following support files:
boost_signals_vc100-mt-1_45.dll
iconv.dll
libeay32.dll
ssleay32.dll
回答2:
you can create a wcf service and host in tableau server as a windows service. write some opretation contract which can execute tabcmd commands in server. from outside you can call operations to publish reports.
来源:https://stackoverflow.com/questions/8065411/publish-tableau-workbook-twb-or-twbx-without-tableau-desktop