1 Reply Latest reply on Oct 24, 2017 2:30 PM by Matt Coles

    Authentication mechanism for obtaining the view CSV

    Peter Rosomoff

      Is Trusted Authentication the only mechanism available for obtaining the CSV with the view data?  If so, do you have an example of how to do this in Python?  I have tried with Basic and NTLM authentication but I am not getting the csv and I am not as good a programmer as I would like to be.  Is this path even allowable by Tableau Server?  Thanks in advance

        • 1. Re: Authentication mechanism for obtaining the view CSV
          Matt Coles

          VizAlerts relies on trusted authentication to obtain the viz data, among other things, because it must impersonate the subscriber so that only data that subscriber can "see" should be accessible to them. Since we cannot (and would not want to) get their username and password, and we need to run the process 24/7, on a schedule, Trusted Auth is our only real option. The REST API allows for impersonation, but does not have an API method for getting data--otherwise I might use that instead.


          However, if you are looking to write your own code that gets CSV data from vizzes, there are other options if you do not need to impersonate other users, and can rely on just pulling everything via your Admin account:




          • Finally, you could just build a standard http request with Python and tack "?:format=csv" to the end of your Tableau Server view url
            • The example here is a bit kloogy since we are passing in a bunch of other parameters and have to generate the trusted ticket, but it might still be helpful to see.


          Let me know if that's what you're looking for, here.