How to get POST node working to retrieve metadata from Tableau Server

I’m new to Knime and also haven’t done much with APIs. I have searched here and on the web, but I can’t find basic instructions for how to set up a Post request to an API server with a token.
I am trying to connect to the Tableau Server Metadata API. This is not the same as the Tableau REST API. All I’ve seen here is guidance on how to send data TO Tableau, but the Metadata API retrieves data from Tableau.

The error message I get is:

WARN  POST Request         3:2        Call #1 failed: java.util.concurrent.ExecutionException: SocketTimeoutException invoking Connect timed out

Info on the service is here:

The preferred way of signing in, which I’m trying to use, is with a Personal Access Token. I believe I’m supposed to sign in first via the REST API URL and then pass the Credentials Token in the subsequent query request as explained here (we are note using Data Management and we have enabled the Metadata API):
Note that “unlike a REST API, the Metadata API has a single [GraphQL] endpoint.”

Personal Access Tokens are described here:

So, I can’t even get the first Post request to work.
Here’s one example of my Post node configuration:

… and…

… and…

I’d appreciate any advice on how to configure this POST, or where some good resources on this topic can be found. Thanks.

normally (as far as I know) credentials/ tokens need to be placed inside the Authorization /Header part in your request and not in the body.
best resources are normally the docs from the provider self (in your case Tableau)

1 Like

Here is the Tableau documentation I’m relying on (I’m using JSON):

Make a Sign In Request with a Personal Access Token
The XML request body (message payload) using a Personal Access Token looks like the following example. The header of the request should contain either the key value pair Content-Type : text/xml, or Content-Type : application/xml.

The same request body using JSON looks like the following. Its header should contain Content-Type : application/json.

“credentials”: {
“personalAccessTokenName”: “MY_TOKEN_NAME”,
“personalAccessTokenSecret”: “qlE1g9MMh9vbrjjg==:rZTHhPpP2tUW1kfn4tjg8”,
“site”: {
“contentUrl”: “MarketingTeam”

Ok, then this API seems to be different. Your error tells you run into a timeout so with your current configuration you are as it seems to able to reach your endpoint. Maybe you could investigate on that
Also make sure you don’t have issues regarding company firewalls or anythning close to that.

Thanks for you help.
I just experimented with putting two values into headers (Token name and Token secret) and I got the same error.
I can reach the Metadata API using the web interface without problems. To do that I first have to login in a separate browser tab.

Hi @LB_Knime , it looks like you are getting a connection time out.

Looking at the url, it looks like you are trying to query an http. Usually, apis, and especially login, should be done via https as it’s more secured. Probably your Tableau server is configured to receive https connections instead of http.

Can you try to query instead of

1 Like

Thanks @bruno29a,
I tried that and made a little progress.
Now I am getting a 401 error.
I’ve confirmed that our server is set up for API, as well.

401 tells you at least that the issue is now authorization which gives some direction which part of the doc might be of relevance now

your post is very useful!
could you, please, tell me where should i put graphql query ?
is it next step?

Thank you very much in advance

I’m afraid I haven’t gotten past authentication. Have you?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.