Get dashboards associated with a workbook or view in Tableau Server using Python and Tableau Server Client

33 Views Asked by At

I want to list dashboards associated with a workbook or view, whichever possible of tableau server.

I went through documentations and blogs, but I could not find a solution.
I was successful to get all the workbooks associated with user, even all the views associated with those workbooks, but I can't find how to get dashboards.

Here is my code to fetch workbooks -


import tableauserverclient as TSC

# Tableau Server details
tableau_server_url = 'my url'
username = 'my user name'
password = 'my password'
siteName = 'site name'

# Authentication and server connection
tableau_auth = TSC.TableauAuth(username, password, site_id=siteName)
server = TSC.Server(tableau_server_url)
server.add_http_options({'verify': False})

with server.auth.sign_in(tableau_auth):

  # Get user details
    user = server.users.get_by_id('my_user_id')
    user_name = user.name
    print(user_name)

    server.users.populate_workbooks(user)
    for wb in user.workbooks:
        print(wb.name)

How can I get the required list?

0

There are 0 best solutions below