1 Reply Latest reply on Apr 6, 2018 7:33 AM by patrick.byrne.0

    Advice please about changing db connections using REST API

    ali twaij

      Hi there, we are looking to test our new servers and wanted to copy an existing Tableau Site into a Test site and then change the db connections for each workbook and data source to the new db server too. Can someone show me how to do a script in VBA for instance (maybe using httpxml object to post to the tableau server) to go through each wb and ds and change the db connection. The plan is to first export the Site into a zipped file using tabcmd exportSite and then import it into the new Test Site.


      This is more detail that i sent to tableau support technician who advised me to post in the community forums for REST API

      One problem we had with manually moving workbooks across
      to a new site is the need to make published datasources local first within the
      workbooks and then publishing to the new site after signing into it. But
      perhaps with REST API we can do an import of a whole site using tabcmd
      importsite/exportsite and then use the REST API to change connections of the
      datasources and then extracts within the workbooks stored in the site. Such
      that if we downloaded them from the new site we would see the updated db
      connections there. If this is the case then what scripts do we need to update
      both the published datasources and the workbook internal extracts so that the
      db connections are all updated? I am good with VBA and I was hoping we can use
      the xmlhttp object to post to the tableau server maybe and run the scripts.