I have moved this thread to the REST API category.
Raised this thread to give it better visibility.
I'm not an API expert, but I think you would be interested in this Document API - GitHub - tableau/document-api-python: Create and modify Tableau workbook and datasource files
Hope this helps
Does your workbook connect to data base as live connection or your workbook use extract data sources from tableau server?
I recently wrote a Python script (attached) that inserts and updates Tableau users using the TSC API. It connects to an Oracle database which is used as the source of the user permissions. It populates temp tables in Oracle from the Tableau user and group information, then finds the differences and either inserts new users (or groups) or adds or removes users from groups. It does not delete users or groups because of our business rules, but this could be added also. It could be modified to get user and group information from a different source.
The link I used for getting the TSC API and docs is Tableau Server Client Library (Python) .
Hope this helps.
You can use this method to edit datasources connection credentials in Tableau Server with the REST API :
Attaching another script using TSC which scans through all the published data connections and workbooks on the server, searches the connection information and updates the server name and/or credentials in each datasource/workbook. This was a lifesaver during a recent migration. Hope this helps.
Will this script work for bulk server name changes which should change the FQDN also.