1 Reply Latest reply on Sep 27, 2016 11:34 AM by Glen Robinson

    500 Internal Server Error message publishing workbook via the REST API (2.2)

    Daniel Gilligan

      My organization needs to republish about 22K workbooks, and the API and the lack of support is currently a tremendous blocker for us. As a proof of concept, I'm working in Postman to send the request prepared in Python via the template code that they provide, and despite a seemingly valid header and request payload (and valid/authenticated session token), I keep running into 500 errors when submitting the actual request to the Tableau Server (v 9.3) and version 2.2 of the API. See attachment for the body of the actual request.


      The vizportal-0 server log shows:


      ERROR com.tableausoftware.api.rest.util.RestApiControllerAdvice - Unhandled exception org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/xml' not supported

      org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/xml' not supported


      It throws some variant of this for every type of encoding that would make sense here, not limited to: text, text/plain, XML (application/XML), text and plain text (UTF-8). Text/xml is apparently the format that's required for workbooks without an extract, so I'm not sure what other encoding I can use here.


      On other hand, a poorly located Tableau page says the XML schema of the request should conform like this, completely at odds with the resulting request from the code examples that they actually provide. I don't feel like chasing down a solution here when the company is providing unreliable documentation, so I'm hoping someone from Tableau can actually step up. Am I missing something really obvious here? I didn't think encoding the request would be the difficult part