Skip to content

Get list of all workbook from Tableau server #633

Closed

Description

@tripathirishabh8

Hi,

I am a server admin and my objective is to get list of all workbooks present on Tableau server.
But If I am specifying site_id then only the content of that particular site is coming and if I am not specifiying the site_id then, the content of only default site is coming.

How to get the list of all workbook irrespective of sites?
Thanks
Rishabh

Activity

  1. alexisnotonffire commented on Jun 13, 2020

    @alexisnotonffire

    I'm not aware of anything in the API that would allow you to do this and don't expect there to be as I don't believe you're able to explore combined site content in the web UI either.

    I think you'll want to loop over a collection of TableauAuth credentials providing a login to each site and run your workbook get function against each site. For example, you'd use something like the following:

    import tableauserverclient as tsc
    
    # server admin creds
    host="tableaudomain.com"
    user="username"
    pwrd="password"
    
    tableau = tsc.Server(host, use_server_version=True)
    auth = tsc.TableauAuth(user,pwrd)
    
    site_auths = []
    with tableau.auth.sign_in(auth):
        site_auths.extend(
            tsc.TableauAuth(user, pwrd, site.id) 
            for site in tsc.Pager(tableau.sites))
    
    workbooks=[]
    for site_auth in site_auths:
        with tableau.auth.sign_in(site_auth):
            workbooks.extend(tsc.Pager(tableau.workbooks))
    
    print(workbooks)

    If you're open to not using this API - and have access to it - you could just dump it out from the workgroup database.

  2. jorwoods commented on Aug 5, 2020

    @jorwoods
    Contributor

    Starting with #655 you can use a baked in site switch rather than creating separate auth objects.

  3. jacalata commented on Oct 1, 2024

    @jacalata
    Contributor

    This isn't on the roadmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions