Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSC.RequestOptions.Field.ContentUrl no longer working with Tableau Server 2023.3.4 #1393

Open
veruzi opened this issue Jun 6, 2024 · 1 comment
Labels
bug needs investigation Issue needs to be looked at by Tableau Server-Side Enhancement

Comments

@veruzi
Copy link

veruzi commented Jun 6, 2024

Describe the bug
Have two Tableau Servers, one at version 2023.3.2 and one at version 2023.3.4.
I was using "TSC.Filter(TSC.RequestOptions.Field.ContentUrl, TSC.RequestOptions.Operator.Equals, content_url)" to filter the workbooks by "content_url".
That is working fine in 2023.3.2 but no longer working in 2023.3.4 (code and error below)

Versions
Details of your environment, including:

  • Tableau Server version: 2023.3.4 (20233.24.0314.1442)
  • Python version: 3.11.3
  • TSC library version: 0.31

To Reproduce
Steps to reproduce the behavior. Please include a code snippet where possible.

import tableauserverclient as TSC

SERVER_URL = "https://my-server-at-2023.3.4.com"
USERNAME = "my_user"
PASSWORD = "my_password"
SITE = "my_site"

content_url = "myContentUrlName"

 # Initialize Tableau Server Client
tableau_auth = TSC.TableauAuth(USERNAME, PASSWORD, SITE)
#server = TSC.Server(SERVER_URL, use_server_version=True)
server = TSC.Server(SERVER_URL, use_server_version=True)
server.add_http_options({'verify': False})

req_options = TSC.RequestOptions()

req_options.filter.add(
    TSC.Filter(TSC.RequestOptions.Field.ContentUrl, TSC.RequestOptions.Operator.Equals, content_url)
)
with server.auth.sign_in(tableau_auth):
    # Get users with options
    workbooks, pagination_item = server.workbooks.get(req_options=req_options)

    if workbooks:
        # Return the first user found
        print(workbooks[0])
    else:
        print("No workbooks found")

Results

tableauserverclient.server.endpoint.exceptions.ServerResponseError:

        400065: Bad Request
                The filter query contains a key which is not recognized for this api version.

Same code above works great when pointing to the Tableau Server v2023.3.2.

@jacalata jacalata added bug Server-Side Enhancement needs investigation Issue needs to be looked at by Tableau labels Jun 21, 2024
@jacalata
Copy link
Contributor

This seems like an internal bug, so I'll get someone to look into it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs investigation Issue needs to be looked at by Tableau Server-Side Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants