diff --git a/samples/publish_workbook.py b/samples/publish_workbook.py index 927e9c3ad..be2c9599f 100644 --- a/samples/publish_workbook.py +++ b/samples/publish_workbook.py @@ -27,10 +27,11 @@ def main(): parser = argparse.ArgumentParser(description='Publish a workbook to server.') parser.add_argument('--server', '-s', required=True, help='server address') parser.add_argument('--username', '-u', required=True, help='username to sign into server') - parser.add_argument('--filepath', '-f', required=True, help='filepath to the workbook to publish') + parser.add_argument('--filepath', '-f', required=True, help='computer filepath of the workbook to publish') parser.add_argument('--logging-level', '-l', choices=['debug', 'info', 'error'], default='error', help='desired logging level (set to error by default)') parser.add_argument('--as-job', '-a', help='Publishing asynchronously', action='store_true') + parser.add_argument('--site', '-S', default='', help='id (contentUrl) of site to sign into') args = parser.parse_args() @@ -41,7 +42,7 @@ def main(): logging.basicConfig(level=logging_level) # Step 1: Sign in to server. - tableau_auth = TSC.TableauAuth(args.username, password) + tableau_auth = TSC.TableauAuth(args.username, password, site_id=args.site) server = TSC.Server(args.server) overwrite_true = TSC.Server.PublishMode.Overwrite diff --git a/tableauserverclient/models/permissions_item.py b/tableauserverclient/models/permissions_item.py index 40049e3c4..216315587 100644 --- a/tableauserverclient/models/permissions_item.py +++ b/tableauserverclient/models/permissions_item.py @@ -20,6 +20,7 @@ class Capability: ChangePermissions = 'ChangePermissions' Connect = 'Connect' Delete = 'Delete' + Execute = 'Execute' ExportData = 'ExportData' ExportImage = 'ExportImage' ExportXml = 'ExportXml'