Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Download Tool (PUT) to Tableau Server - Bad Field Type Error

stapuff106
8 - Asteroid

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 

 

Capture.PNG

6 REPLIES 6
MatthewO
Alteryx
Alteryx

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. 

 

custom_put.PNG

stapuff106
8 - Asteroid

@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

MatthewO
Alteryx
Alteryx

There are few things I would try to further diagnose the problem:

  • Ensure the body is structured properly. It may be helpful to review the API documentation, particularly if it has examples. 
  • Try specifying the Content-Type in the Headers tab
stapuff106
8 - Asteroid

@MatthewO 

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

stapuff106
8 - Asteroid

@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 

 

https://github.com/tableau/server-client-python/issues/135

MatthewO
Alteryx
Alteryx

Glad to hear you were able to get this running successfully, @stapuff106!

Labels