Home > 

Administrator Guide > tabcmd > tabcmd Commands

tabcmd Commands

Here are the commands that can be used with the tabcmd command line tool:

addusers group-name export
creategroup group-name get url
createproject project-name listsites
createsite site-name login
createsiteusers filename.csv logout
createusers filename.csv publish filename.twb(x),filename.tds(x), or filename.tde
delete workbook-name or datasource-name refreshextracts workbook-name or datasource-name
deletegroup group-name removeusers group-name
deleteproject project-name runschedule schedule-name
deletesite site-name set setting
deleteusers filename.csv syncgroup group-name
editsite site-name version

addusers group-name

Adds the users listed in the --users argument to the group with the given group-name.

Example

tabcmd addusers "Development" --users "users.csv"

Option (short) Option (long) Argument Description
 
--users
filename.csv Add the users in the given file to the specified group. The file should be a simple list with one username per line. The users should already be created on Tableau Server. See also Import Users from a CSV File.
 
--[no-]complete
  When set to complete this option requires that all rows be valid for any change to succeed. If not specified, --complete is used.

creategroup group-name

Creates a group with the given group name. Use addusers (for local groups) and syncgroup (for Active Directory groups) commands to add users after the group has been created.

Example

tabcmd creategroup "Development"

createproject project-name

Creates a project with the given project name.

Example

tabcmd createproject -n "Quarterly_Reports" -d "Workbooks showing quarterly sales reports."

Option (short) Option (long) Argument Description
-n --name name Specify the name of the project that you want to create.
-d --description description Specify a description for the project.

createsite site-name

Creates a site with the given site name.

Examples

Create a site named West Coast Sales. A site ID of WestCoastSales will be automatically created, the site will have no storage quota limit, and site administrators will be able to add and remove users:

tabcmd createsite "West Coast Sales"

Create a site named West Coast Sales with a site ID of wsales:

tabcmd createsite "West Coast Sales" -r "wcoast"

Prevent site administrators from adding users to the site:

tabcmd createsite "West Coast Sales" --no-site-mode

Set a storage quota, in MB::

tabcmd createsite "West Coast Sales" --storage-quota 100
Option (short) Option (long) Argument Description
-r --url site ID Used in URLs to specify the site. Different from the site name.
  --user-quota number of users Maximum number of users that can be added to the site.
  --[no-]site-mode   Allow or deny site administrators the ability to add users to or remove users from the site.
  --storage-quota number of MB In MB, the amount of workbooks, extracts, and data sources that can be stored on the site.

createsiteusers filename.csv

This command allows site administrators to add users to a site. It creates users on the current site, using the given comma separated values (CSV) file. The file may have the following columns, in the order shown below:

  1. Username

  2. Password

  3. Full Name

  4. License Level (interactor/viewer/unlicensed)

  5. Administrator (site/none)

  6. Publisher (yes/true/1 or no/false/0)

  7. Email Address

The file can have fewer columns. For example it can be a simple list with one username per line. When the server is using Active Directory authentication, the Password column is ignored. Quotes may be used if a value contains commas. See Import Users from a CSV File for other details.

Example

tabcmd createsiteusers "users.csv" --license "Interactor" --publisher

Option (short) Option (long) Argument Description
  --nowait   Do not wait for asynchronous jobs to complete.
  --silent-progress   Do not display progress messages for asynchronous jobs.
  --license Interactor, Viewer, or Unlicensed Sets the default license level for all users. This setting may be overridden by the value in the CSV file.
  --admin-type Site or None Assigns or removes the site admin right to all users in the CSV file. This setting may be overridden by the value in the CSV file. The default is None for new users and unchanged for existing users. System administrators cannot be created or demoted using createsiteusers (use createusers instead).
  --[no-]publisher   Assigns or removes the Publish right to all users in the CSV file by default. This setting may be overridden by the value in the CSV file. The default is no for new users and unchanged for existing users.
  --[no-]complete   Require (or not require) that all rows be valid for any change to succeed. By default, --complete option is used.

createusers filename.csv

Creates the users listed in the given comma separated values (CSV) file. This command can only be used by system administrators. The file may have the following columns, in the order shown below:

  1. Username

  2. Password

  3. Full Name

  4. License Level (interactor/viewer/unlicensed)

  5. Administrator (system/site/none)

  6. Publisher (yes/true/1 or no/false/0)

  7. Email Address

The file can have fewer columns. For example it can be a simple list with one username per line. When the server is using Active Directory authentication, the Password column should be left blank. Quotes may be used if a value contains commas. See Import Users from a CSV File for other details.

Example

tabcmd createusers "users.csv" --license "Interactor" --publisher

Option (short) Option (long) Argument Description
  --nowait   Do not wait for asynchronous jobs to complete.
  --silent-progress   Do not display progress messages for asynchronous jobs.
  --license Interactor, Viewer, or Unlicensed Sets the default license level for all users. This setting may be overridden by the value in the CSV file.
  --admin-type System, Site, or None Assigns or removes the Admin right to all users in the CSV file by default. This setting may be overridden by the value in the CSV file. The default is None for new users and unchanged for existing users.
  --[no-]publisher   Assigns the Publish right to all users in the CSV file by default. This setting may be overridden by the value in the CSV file. The default is no for new users and unchanged for existing users.
  --[no-]complete   Requires that all rows be valid for any change to succeed. By default, --complete option is used.

delete workbook-name or datasource-name

Deletes the given workbook or data source from the server. This command takes the name of the workbook or data source as it is on the server, not the file name when it was published.

Example

tabcmd delete "Sales_Analysis"

Option (short) Option (long) Argument Description
-r --project Project name The name of the project containing the workbook or data source you want to delete. If not specified, the “Default” project is assumed.
  --workbook Workbook name The name of the workbook you want to delete.
  --datasource Data source name The name of the data source you want to delete.

deletegroup group-name

Deletes the group with the given group-name from the server.

Example

tabcmd deletegroup "Development"

deleteproject project-name

Deletes the project with the given project-name from the server.

Example

tabcmd deleteproject "Designs"

deletesite site-name

Deletes the site with the given site-name from the server.

Example

tabcmd deletesite "Development"

deleteusers filename.csv

Deletes the users listed in the given comma separated (CSV) file. The file is a simple list of one username per line.

Example

tabcmd deleteusers "users.csv"

Option (short) Option (long) Argument Description
  --[no-]complete   When set to --complete this option requires that all rows be valid for any change to succeed. If not specified, --complete is used.

editsite site-name

Allows you to change the name of a site or its web folder name. You can also use this command to allow or deny site administrators the ability to add and remove users. If site administrators have user management rights, you can specify how many users they can add to a site.

Examples

tabcmd editsite wc_sales --site-name "West Coast Sales"

tabcmd editsite wc_sales --site-id "wsales"

tabcmd editsite wsales --status ACTIVE

tabcmd editsite wsales --user-quota 50

Option (long) Argument Description
--site-name Name to change the site to The name of the site that's dislayed.
--site-id The site ID to change the site to Used in the URL to uniquely identify the site.
--user-quota Number of users Maximum number of users who can be members of the site.
--[no-]site-mode   Allow or prevent site administrators from adding users to the site.
--status ACTIVE or SUSPENDED Activate or suspend a site.
--storage-quota Number of MB In MB, the amount of workbooks, extracts, and data sources that can be stored on the site.

export

Exports a view or workbook from Tableau Server and saves it to a file. Note the following when you use this command:

Clearing the Cache to Use Real-Time Data

You can optionally add the URL parameter ?:refresh=yes to force a fresh data query instead of pulling the results from the cache. If you are using tabcmd with your own scripting and the refresh URL parameter is being used a great deal, this can have a negative impact on performance. It’s recommended that you use refresh only when real-time data is required—for example, on a single dashboard instead of on an entire workbook.

Examples

Views

tabcmd export "Q1Sales/Sales_Report" --csv -f "Weekly-Report"

tabcmd export -t Sales "Sales/Sales_Analysis" --pdf -f "C:\Tableau_Workbooks\Weekly-Reports"

tabcmd export "Finance/InvestmentGrowth" --png

tabcmd export "Finance/InvestmentGrowth?:refresh=yes" --png

Workbooks

tabcmd export "Q1Sales/Sales_Report" --fullpdf

tabcmd export -t Sales "Sales/Sales_Analysis" --fullpdf --pagesize tabloid -f "C:\Tableau_Workbooks\Weekly-Reports"

Option (short) Option (long) Argument Description
-f --filename The name and extension to use for the saved file Saves the file with the given filename.
  --csv   View only. Export the view’s data in CSV format.
  --pdf   View only. Export as a PDF.
  --png   View only. Export as an image in PNG format.
  --fullpdf   Workbook only. Export as a PDF. The workbook must have been published with Show Sheets as Tabs enabled.
  --pagelayout landscape, portrait Sets the page orientation of the exported PDF. If not specified, its Tableau Desktop setting will be used.
  --pagesize unspecified, letter, legal, note folio, tabloid, ledger, statement, executive, a3, a4, a5, b4, b5, quatro Sets the page size of the exported PDF. Default is letter.
  --width Number of pixels Sets the width. Default is 800 px.
  --height Number of pixels Sets the height.Default is 600 px.

get url

Using a URL string as one of its parameters, makes an HTTP GET request of Tableau Server. The result is returned as a file. Note the following when you use this command:

Clearing the Cache to Use Real-Time Data

You can optionally add the URL parameter ?:refresh=yes to force a fresh data query instead of pulling the results from the cache. If you are using tabcmd with your own scripting, using the refresh parameter a great deal can have a negative impact on performance. It's recommended that you use refresh only when real-time data is required—for example, on a single dashboard instead of on an entire workbook.

Examples

Views

tabcmd get "/views/Sales_Analysis/Sales_Report.png" --filename "Weekly-Report.png"

tabcmd get "/views/Finance/InvestmentGrowth.pdf" -f "Q1Growth.pdf"

tabcmd get "/views/Finance/InvestmentGrowth.csv"

tabcmd get "/views/Finance/InvestmentGrowth.png?:size=640,480" -f growth.png
tabcmd get "/views/Finance/InvestmentGrowth.png?:refresh=yes" -f growth.png

Workbooks

tabcmd get "/workbooks/Sales_Analysis.twb" -f "C:\Tableau_Workbooks\Weekly-Reports.twb"

tabcmd get "/workbooks/Sales.xml"

Other

tabcmd get "/users.xml" --filename "UserList.xml"

Option (short) Option (long) Argument Description
-f --filename Name to save the file as Saves the file with the given filename.

listsites

Returns a list of sites to which the logged in user belongs.

Example

tabcmd listsites -u corman -pw P@ssword!

login

Logs in a Tableau Server user. Use the --server, --site, --username, --password global options to create a session. If you want to log in using the same information you’ve already used to create a session just specify the --password option. The server and user name stored in the cookie will be used.

If the server is using a port other than 80 (the default), you will need to specify the port.

You need the --site (-t) option only if the server is running multiple sites and you are logging in to a site other than the Default site. If you do not provide a password you will be prompted for one. If the --no-prompt option is specified and no password is provided the command will fail.

Once you log in, the session will continue until it expires on the server or the logout command is run.

Example

Logs you in to the Tableau Server running on your local machine:

tabcmd login -s http://localhost -u jsmith -p p@ssw0rd!

Logs you in to the Sales site on sales-server:

tabcmd login -s http://sales-server -t Sales -u administrator -p p@ssw0rd!
tabcmd login -s http://sales-server:8000 -t Sales -u administrator -p p@ssw0rd!

Logs you in to the Sales site on sales-server using SSL:

tabcmd login -s https://sales-server -t Sales -u administrator -p p@ssw0rd!

Establishes a forward proxy and port for localhost:

tabcmd login --proxy myfwdproxyserver:8888 -s http://localhost -u jsmith -p p@ssW0rd!

Logs you in to the reverse proxy using SSL:

tabcmd login -s https://myreverseproxy -u jsmith -p p@ssW0rd!

Option (short) Option (long) Argument Description
-s --server Server URL

If you are running the command from an on-premise Tableau Server computer, you can use http://localhost. Otherwise, specify the computer’s URL, such as http://bigbox.myco.com or http://bigbox.

For Tableau Online specify the URL that you use to sign in to the service; either https://online.tableau.com or https://online.tableausoftware.com.

-t --site siteID

Include this option if the server has multiple sites, and you are logging in to a site other than the Default site.

The site ID is used in the URL to uniquely identify the site. For example, a site named West Coast Sales might have a site ID of west-coast-sales.

-u --username username The username of the user logging in. For Tableau Online, the username is the user’s email address.
-p --password password Password for the user specified for --username. If you do not provide a password you will be prompted for one.
  --password-file filename.txt Allows the password to be stored in the given file rather than the command line, for increased security.
-x --proxy Host:Port Use to specify the HTTP proxy server and port for the tabcmd request.
  --no-prompt   Do not prompt for a password. If no password is specified, the login command will fail.
  --no-proxy   Do not use an HTTP proxy server.
  --[no-]cookie   Saves the session ID on login. Subsequent commands will not require a login. Cookies are enabled (--cookie) by default.
  --timeout SECONDS Number of seconds The number of seconds the server should wait before processing the login command. Default: 30 seconds.

logout

Logs out of the server.

Example

tabcmd logout

publish filename.twb(x), filename.tds(x), or filename.tde

Publishes the given workbook (.twb(x)), data source (.tds(x)), or data extract (.tde) to Tableau Server. By default, all sheets in the workbook are published without database usernames or passwords.

If the workbook contains user filters, one of the thumbnail options must be specified.

Example

tabcmd publish "analysis.twbx" -n "Sales_Analysis" --db-username "jsmith" --db-password "p@ssw0rd"

If the file is not in the same directory as tabcmd, include the full path to the file.

Example

tabcmd publish "C:\Tableau Workbooks\analysis.twbx" -n "Sales_Analysis" --db-username "jsmith" --db-password "p@ssw0rd"

Option (short) Option (long) Argument Description
-n --name Name of the workbook or data source on the server If omitted, the workbook, data source, or data extract will be named after filename.
-o --overwrite   Overwrites the workbook, data source, or data extract if it already exists on the server.
-r --project Name of a project Publishes the workbook, data source, or data extract into the specified project. Publishes to the “Default” project if not specified.
  --db-username  

Use this option to publish a database username with the workbook, data source, or data extract.

  --db-password   Use this option to publish a database password with the workbook, data source, or data extract.
  --save-db-password   Stores the provided database password on the server.
  --oauth-username Email address of the user account

Connects the user through a preconfigured OAuth connection, if the user already has a saved access token for the cloud data source specified in --name. Access tokens are managed in user preferences.

For existing OAuth connections to the data source, use this option instead of --db-username and --db-password.

  –-save-oauth   Saves the credential specified by --oauth-username as an embedded credential with the published workbook or data source.

Subsequently, when the publisher or server admin signs in to the server and edits the connection for that workbook or data source, the connection settings will show this OAuth credential as embedded in the content.

If you want to schedule extract refreshes after publishing, you must include this option with --oauth-username. This is analogous to using --save-db-password with a traditional database connection.

  --thumbnail-username   If the workbook contains user filters, the thumbnails will be generated based on what the specified user can see. Cannot be specified when --thumbnail-group option is set.
  --thumbnail-group   If the workbook contains user filters the thumbnails will be generated based on what the specified group can see. Cannot be specified when --thumbnail-username option is set.
  --tabbed   When a workbook with tabbed views is published, each sheet becomes a tab that viewers can use to navigate through the workbook. Note that this setting will override any sheet-level security.
  --append   Append the extract file to the existing data source.
  --replace   Use the extract file to replace the existing data source.
  --disable-uploader   Disable the incremental file uploader.
  --disable-tde-compression   Stop compressing the extract file before it's uploaded.
  --restart   Restart the file upload.

refreshextracts workbook-name or datasource-name

Performs a full or incremental refresh of extracts belonging to the specified workbook or data source. This command takes the name of the workbook or data source as it appears on the server, not the file name when it was published. Only an administrator or the owner of the workbook or data source is allowed to perform this operation.

Examples

tabcmd refreshextracts --datasource sales_ds

tabcmd refreshextracts --workbook "My Workbook"

tabcmd refreshextracts --url SalesAnalysis

Option (short) Option (long) Argument Description
  --incremental   Runs the incremental refresh operation.
  --synchronous   Runs the full refresh operation immediately in the foreground.
  --workbook Name of a workbook The name of the workbook containing extracts to refresh. If the workbook has spaces in its name, enclose it in quotes.
  --datasource Name of a data source The name of the data source containing extracts to refresh.
  --project Name of a project Use with --workbook or --datasource to identify a workbook or data source in a project other than Default. If not specified, the Default project is assumed.
  --url URL name of a workbook The name of the workbook as it appears in the URL. A workbook published as “Sales Analysis” has a URL name of “SalesAnalysis”.

removeusers group-name

Removes the users listed in the --users argument from the group with the given group-name.

Example

tabcmd removeusers "Development" --users "users.csv"

Option (short) Option (long) Argument Description
  --users filename.csv Remove the users in the given file from the specified group. The file should be a simple list with one username per line.
  --[no-]complete   Requires that all rows be valid for any change to succeed. If not specified --complete is used.

runschedule schedule-name

Runs the specified schedule. This command takes the name of the schedule as it is on the server.

Example

tabcmd runschedule "5AM Sales Refresh"

set setting

Enables the specified setting on the server. Details about each setting can be seen on the Maintenance page on the server. Use an exclamation mark in front of the setting name to disable the setting. You can enable or disable the following settings:

Example

tabcmd set embedded_credentials

syncgroup group-name

Synchronizes a Tableau Server group with an Active Directory group. If the Tableau Server group does not already exist, it is created and synchronized with the specified Active Directory group.

Example

tabcmd syncgroup "Development"

Note: If you synchronize a group that you are a member of, changes that you make using this command do not apply to your user. For example, if you use this command to remove the Administrator right from users in a group that you are a member of, you are still an administrator when the command finishes.

Option (short) Option (long) Argument Description
  --license viewer
interactor
unlicensed
Sets the license level for users in the group.
  --administrator system
site
none
Assigns or removes the Administrator right for users in the group. The system argument specifies that users should be made system administrators, and the site argument specifies that users should be made site administrators. The none option removes the Administrator right from all users in the group (except you, if you are a member of the group that you are synchronizing). If you do not include this option, users who are added to the group after you run the command are not assigned the Administator right.
  --publisher   Assigns the Publish right for users in the group.
  --no-publisher   Removes the Publish right for users in the group.
  --complete
  Requires that all rows be valid for any change to succeed. This value is the default behavior for the command.
  --no-complete   Specifies that not all rows must be valid in order for the command to complete.
  --silent-progress   Suppresses progress messages.

version

Prints the version information for the current installation of the tabcmd utility.

Example

tabcmd version