| title | API reference |
|---|---|
| layout | docs |
- TOC {:toc}
Source files: server/endpoint/auth_endpoint.py, models/tableau_auth.py
Signs you in to Tableau Server.
Auth.sign_in(authentication_object)Signs you out of Tableau Server.
Auth.sign_out()Source files: server/endpoint/sites_endpoint.py, models/site_item.py
Creates a new site for the given site item object.
Sites.create(new_site_item)Example:
new_site = TSC.SiteItem(name='Tableau', content_url='tableau', admin_mode=TSC.SiteItem.AdminMode.ContentAndUsers, user_quota=15, storage_quota=1000, disable_subscriptions=True)
self.server.sites.create(new_site)Gets the site with the given ID.
Sites.get_by_id(id)Gets the first 100 sites on the server. To get all the sites, use the Pager.
Sites.get()Modifies a site. The site item object must include the site ID and overrides all other settings.
Sites.update(site_item_object)Deletes the site with the given ID.
Sites.delete(id)Source files: server/endpoint/projects_endpoint.py
Creates a project for the given project item object.
Projects.create(project_item_object)Example:
new_project = TSC.ProjectItem(name='Test Project', description='Project created for testing')
new_project.content_permissions = 'ManagedByOwner'
self.server.projects.create(new_project)Get the first 100 projects on the server. To get all projects, use the Pager.
Projects.get()Modifies a project. The project item object must include the project ID and overrides all other settings.
Projects.update(project_item_object)Deletes a project by ID.
Projects.delete(id)Source files: server/endpoint/workbooks.py, models/workbook_item.py
Get the first 100 workbooks on the server. To get all workbooks, use the Pager.
Workbooks.get()Gets a workbook with a given ID.
Workbooks.get_by_id(id)Publish a local workbook to Tableau Server.
Workbooks.publish(workbook_item, file_path, publish_mode)Where the publish mode is one of the following:
- Append
- Overwrite
- CreateNew
Example:
wb_item = TSC.WorkbookItem(name='Sample',
show_tabs=False,
project_id='ee8c6e70-43b6-11e6-af4f-f7b0d8e20760')
server.workbooks.publish(wb_item,
os.path.join(YOUR_DIR, 'SampleWB.twbx'),
self.server.PublishMode.CreateNew)Modifies a workbook. The workbook item object must include the workbook ID and overrides all other settings.
Workbooks.update(wb_item_object)Updates a workbook connection string. The workbook connections must be populated before they strings can be updated.
Workbooks.update_conn(workbook, workbook.connections[0])Deletes a workbook with the given ID.
Workbooks.delete(id)Downloads a workbook to the specified directory.
Workbooks.download(id, file_path)Populates a list of views for a workbook object. You must populate views before you can iterate through the views.
Workbooks.populate_views(workbook_obj)Populates a list of connections for a given workbook. You must populate connections before you can iterate through the connections.
Workbooks.populate_connections(workbook_obj)Populates a preview image for a given workbook. You must populate the image before you can iterate through the connections.
Workbooks.populate_connections(workbook_obj)Returns a list of views for a workbook. Before you get views, you must call populate_views.
workbook_obj.views
Returns a list of connections for a workbook. Before you get connections, you must call populate_connections.
workbook_obj.connections
Source files: server/endpoint/views_endpoint.py, models/view_item.py
Source files: server/endpoint/datasources_endpoint.py, models/datasource_item.py
Source files: server/endpoint/users_endpoint.py, models/user_item.py
Source files: server/endpoint/groups_endpoint.py, models/group_item.py,