I have done a bunch of GET to Tableau Server, but my first PUT. As soon as I select PUT I get the following error pictured.
My field "body" contains the following and defined as V_WSTRING:
'<tsRequest>
<database description="Test123">
</database>
</tsRequest>'
The URL I am passing:
'https://'+[site_url]+'/api/3.8/sites/'+[site_id]+'/databases/5b671100-cc98-4946-8a0d-195860b82080'
Here is the errors.
JSON_ValueString
Bad Request
Required request body is missing: public com.tableausoftware.api.rest.IRestApiResponse com.tableausoftware.api.rest.databases.RestApiDatabaseController.updateDatabase(com.tableausoftware.api.rest.util.RestApiVersion,com.tableausoftware.domain.user.IAuth...
400000
{"error":{"summary":"Bad Request","detail":"Required request body is missing: public com.tableausoftware.api.rest.IRestApiResponse com.tableausoftware.api.rest.databases.RestApiDatabaseController.updateDatabase(com.tableausoftware.api.rest.util.RestApiV...
I looked at versions as being an issue however the method appears to be available in 3.5 and I am using 3.8.
Any thoughts on what is causing the bad data type error?
Thanks,
Puff
Solved! Go to Solution.
Hello @stapuff106 :
The PUT action in the Download tool expects a blob data type in the body field. You could try modifying the HTTP Action to "Custom", then typing "PUT". This should resolve the data type error on your body.
@MatthewO I did as suggested and the error went away and another appeared.
Deserialization problem: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source: (StringReader); line: 1, column: 2];
'<tsRequest>
<database description="Test123">
</database>
</tsRequest>'
Thanks,
Puff
There are few things I would try to further diagnose the problem:
The example was from the API Doc's.
I added Content-Type and ..... get ready for it
The new error:
Forbidden
'USER' isn't authorized to update database.
409051
I will need to reach out to Tableau and figure this out. The USER in this case is a Site Admin.
Thanks,
Puff
@MatthewO As a FYI I changed the body from databases to datasources to update individual datasource descriptions which runs through with no issues, however, is a bug in Tableau. See link.
The Publish to Tableau tools does not have description as a value to update either.
Puff
Glad to hear you were able to get this running successfully, @stapuff106!
Wonderful solution. Worked like a charm! Thanks :)