Skip to main content

My tableau API version is 2.6

My Python code:

from tableau_api_lib import TableauServerConnection

from tableau_api_lib.utils.querying import get_views_dataframe, get_view_data_dataframe, get_workbooks_dataframe,get_datasources_dataframe

tableau_server_config = {

    'my_env': {

        'server': 'https://myserver.com',

        'api_version': '2.6',

        'username': 'username',

        'password': 'password,

        'site_name': 'ABC',

        'site_url': '',

        'cache_buster': '',

        'temp_dir': ''

    }

}

conn = TableauServerConnection(config_json=tableau_server_config, env='my_env')

conn.sign_in()

 

#print(conn.query_sites().json()) 

 

workbooks_df = get_workbooks_dataframe(conn)

#print(workbooks_df[['name', 'id']])

wb_response = conn.update_workbook_now('abcd-efgh-ijkl-mnop-qrst')

 

while executing i am getting error as:

InvalidRestApiVersion: 

    The REST API endpoint referenced in function 'update_workbook_now' requires a minimum API version of 2.8.

    The API version you are using is 2.6, which pre-dates the endpoint referenced.

    Please visit Tableau's REST API reference to identify the methods relevant for your legacy API version.

7 respostas
  1. 19 de abr. de 2021, 20:15
    I can see the python code is invoking the refresh task in tableau, so yes the code is working. But also the job in tableau is failed with the error message. So not sure why tableau is through java exception error.
0/9000