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: javax.ws.rs.ProcessingException: java.net.SocketTimeoutException: SocketTimeoutException invoking http://dashboards.vestahealthcare.com/api/3.6/auth/signin: Connect timed out
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): https://help.tableau.com/current/api/metadata_api/en-us/docs/meta_api_auth.html
Note that “unlike a REST API, the Metadata API has a single [GraphQL] endpoint.”
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)
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.
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 https://dashboards.vestahealthcare.com/api/3.6/auth/signin instead of http://dashboards.vestahealthcare.com/api/3.6/auth/signin?