1 Reply Latest reply on Nov 16, 2018 1:10 PM by Saket Dabi

    Python Script to Refresh Extract using REST API

    Saket Dabi

      Hello This is my first attempt to create a python script to refresh an extract using REST Api , i tried using the sample example given in Tableau sever client but i was not able to do so. Can anyone share their own example on how to set the sample example correctly.

        • 1. Re: Python Script to Refresh Extract using REST API
          Saket Dabi

          Simple script

          import tableauserverclient as TSC

          tableau_auth = TSC.TableauAuth(user, password)
          server = TSC.Server('Address')
          server.version = '2.3'
          resource_id= 6109
          with server.auth.sign_in(tableau_auth):
          print('connection made')
          print(server.version)
          #resource = server.workbooks.get_by_id(resource_id)
          server.workbooks.refresh(workbook_id='6109')

          server.auth.sign_out()
          print('connection closed')