I am replying to bring this thread back to the top of the forums threads. Are you still researching this issue?
1 of 1 people found this helpful
Several ideas here:
A) use tabcmd, it's really easy to configure.
B) You can use the trusted ticket API or REST API to get a ticket and then curl or equivalent and a specially constructed URL.
C) Do it all in code, see this example from VizAlerts https://github.com/tableau/VizAlerts/blob/development/vizalert/tabhttp.py for an example.
D) If you're using Tableau Server then VizAlerts could be an option and that adds in scheduling, threshold-based alerting, etc. We're working on adding file export as a feature for VizAlerts, if you've got Python chops we'd be glad for the help!
Sent from my iPhone
Thanks Jonathan Drummey
We're trying this from linux, so tabcmd not an option.
I've had a quick look at these. Option B will be the best solution for us.
I'm able to use the REST API to get auth token;
xml post data for /api/2.3/auth/signin
<credentials name="svctableau" password="somepassword">
<site contentUrl="" />
auth token in the response
<?xml version='1.0' encoding='UTF-8'?>
<site id="1a10f5b9-029b-some-siteid-773d1690338c" contentUrl="" />
<user id="74155258-16c1-some-userid-90b3e04e9beb" />
Is this the the same as the ticket you mention?
I'm struggling to build the request using this ticket. Any guidance on "specially constructed URL"?
Thanks for the heads up on the python project. Exciting to see this, will keep an eye on it.
My memory was bad, the token is not the same as a trusted ticket so it takes a little more work than just a URL. I learned this from the fiendishly brilliant Tamas Foldi.
Once you've got the token, you can craft a curl or app-specific request with the right headers, here's an example:
curl 'https://10ax.online.tableau.com/t/datablickbeta/views/EDAcuity/Sheet2.csv' -H 'Cookie: workgroup_session_id=<token>' -H 'Connection: keep-alive' --compressed > Sheet2.csv
Where <token> is replaced by the token you got from the REST API.
Also here's a whole thread on using tabcmd on Linux: Re: TabCmd on Linux.
I don't think using this approach works with the newer versions of Tableau Server. I tried it and got a csv back but it had a bunch of errors. I don't want to use tabcmd. Any ideas?