-
Notifications
You must be signed in to change notification settings - Fork 447
Description
Describe the bug
When connecting to Tableau Server the RestAPI version is incorrect when using use_server_version=True
tableau_auth = TSC.PersonalAccessTokenAuth(tokenName, tokenSecret, siteName)
server = TSC.Server(serverUrl, use_server_version=True)
server.add_http_options({'verify': 'c:/temp/server.crt'})
print("Rest API version:", server.version)
I am seeing the output
Rest API version: 2.4
However, when I execute these lines
s_info = server.server_info.get()
print("\nServer info:")
print("\tProduct version: {0}".format(s_info.product_version))
print("\tREST API version: {0}".format(s_info.rest_api_version))
print("\tBuild number: {0}".format(s_info.build_number))
I get a completely different version of API reported
Server info:
Product version: 2023.1.16
REST API version: 3.19
Build number: 20231.24.0809.0841
v3.19 aligns with what I am seeing when manually calling GET /api/api-version/serverinfo
<tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tableau.com/api https://help.tableau.com/samples/en-us/rest_api/ts-api_2_4.xsd"> <serverInfo> <productVersion build="20231.24.0809.0841">2023.1.16</productVersion> <restApiVersion>3.19</restApiVersion> </serverInfo> </tsResponse>
Why is use_server_version=True not being respected? Is there a setting that needs to be adjusted in the IDE or on the server?
I also tried to detect the conflict and set it manually, but this doesn't seem to help.
if server.version < s_info.rest_api_version:
print(f'version mismatch, setting to {s_info.rest_api_version}')
server.version = s_info.rest_api_version
Versions
- Tableau Server Version: 2023.1.16 (20231.24.0809.0841) 64-bit Windows
- Python: 3.10
- TSC library version: tableauserverclient-0.37 (latest)