无法使用TableauServerClient更新OwnerId

时间:2019-05-07 20:56:04

标签: python python-3.x api tableau tableau-server

当尝试使用TSC更新工作簿的owner_id时,出现以下错误:

400000:错误的请求
        有效负载格式不正确或不完整

这是我的代码:

request_options = TSC.RequestOptions(pagesize=1000)
    all_workbooks, pagination_item = server.workbooks.get(request_options)
    for workbook in all_workbooks:
        if(workbook.name == reportname):
            id = workbook.id
            workbook = server.workbooks.get_by_id(id)
            print('Workbook fetched successfully')
            workbook.owner_id = '1234'
            print('New owner assigned to workbook')
            workbook = server.workbooks.update(workbook)
            print("\nUpdated {0} workbook. Owner is now {1}".format(workbook.name, workbook.owner_id))

有人可以帮我吗?
TIA

0 个答案:

没有答案