1 Reply Latest reply on Oct 24, 2016 1:21 PM by Patrick A Van Der Hyde

    Rest API - Query Workbooks & Update workbook Connection

    Naman Patel



      I have been playing with REST API for couple of days and it seems helpful. We have database host moving from current server to new one and need to mass update connection information on over 200 workbooks.


      My approach is to get list of workbook, workbook id, connection, connection id, etc, and based on that form xml to put through rest api to update connection. I am facing 2 issues..



      1. When I try to query workbooks by user, I don't see the test workbook I just published through tableau desktop with the same user. I get all previously existing workbooks that user has rights to view,  just the one recently published is missing from rest response, I do see same workbook for that user on server UI. I tried it on 2 servers (9.3 and 10.1), same issue.


      2. I updated connection on workbook. There are 2 connections on workbook, I updated just one with specific ID and it updated both connections. I have many workbook with multiple connection with various datasource, if this updates all of the connection its of no use, and potentially risky.


           e.g request: /api/2.2/sites/8df669d5-8528-4141-89fa-5f85bec9826e/workbooks/e2dffbfa-5024-11e4-9ecd-17f5c91a2095/connections/251b3b27-0f54-4bd8-9196-c247a244d030



          serverAddress="xxx.in.here.com" serverPort="1521"

          userName="xxx" password="xxx"

          embedPassword="embed-password" />



      Any pointers are appreciated.