Because the TSC library is a client for the Tableau Server REST API, you need to confirm that the version of the TSC library that you use is compatible with the version of the REST API used by your installation of Tableau Server.
For reference, the REST API and Resource Versions page has more details about versions.
To display the default version of the REST API used by TSC, run the following code:
import tableauserverclient as TSC server = TSC.Server('http://SERVER_URL') print(server.version)
For example, the code might display version
It’s recommended to always use the latest REST API version supported by the server. This helps ensure you’ll get the latest behaviors as documented here and in the Tableau REST API documentation.
There are two options for always using the the latest version supported by the instance of Tableau Server you are connecting to:
The first method is to specify
use_server_version=True as one of the arguments, for example:
import tableauserverclient as TSC server = TSC.Server('http://SERVER_URL', use_server_version=True)
The second method is to create the server object first, then call the
use_server_version() method on it. There are some situations where this method is needed. For instance, if you want to disable certificate checking, you have to do that after you create the server object, but before you make calls to the server (use_server_version makes a call to the server).
import tableauserverclient as TSC server = TSC.Server('http://SERVER_URL') server.use_server_version()
To use a specific version of the REST API, set the version like so:
import tableauserverclient as TSC server = TSC.Server('http://SERVER_URL') server.version = '3.6'
The current version of TSC only supports the following REST API and Tableau Server versions:
|REST API version||Tableau Server version|
Note that Tableau provides support and security updates for each version of the product for thirty (30) months after release. Review the Supported Versions table on the Technical Support Programs page for details.