Connect to Web Service (RestAPI)

Hi,

I am new to knime and have following question:

I am trying to read data from a web service api.
To access it I have:

  • an URL
  • a certificate
  • a PIN

First I tried to acess the web service via postman, to make sure it works. This works fine. Now I would like to do it in KNIME.
I used the GET Request with following configurations:



I get this error:
SocketException invoking [URL] : Unexpected end of file from server

My Questions are:

  1. what does the error tell me?
  2. I think with the current settings the certificate isn’t used by the get request. So how do I include my certificate in the get request?

Thanks in advance!

Hi @LNH4,

and welcome to the Knime community. The error you face might not mean much except it terminated the connection because the verification failed. If I’d administer a server, I’d, i.e. to prevent brute forcing, reveal as little information as possible.

Reasons can be many including the request type i.e. JSN vs. html vs. text … you name it.

To address you problem, what kind of authentication does the server use. Is it by any chance htaccess? I did a quick Google Search and found that postman, respectively the API you try to connect to, offers several authentication methods:

You might want to explicitly check out these docs from postman:

Best
Mike

4 Likes

Hi @mwiegand

thank you for your fast reply.

So to make the request work in Postman I uploaded the p12 certificate where I had to add the PIN aswell.
In the GET Request itself I only used the authorization method Basic Auth and added my username and password.
That worked well.
I also know the data I want to retrieve is data type json.
→ I hope that answers your question.

I did the same in the GET Request Node in KNIME. But I don’t know if the certificate is used during the GET request.
So how can I make sure the GET Request Node in KNIME uses the certificate? My guess is that thats where the problem is, but I am don’t have enough experience to be sure.
Or is there any way other to further localise the error?

Best regards

Hi @LNH4,

you are most welcome. The described circumstances are a bit too abstract to comprehend without a test workflow. Can you reset your credentials and share it for further investigation please?

If not, screenshots would be appreciated to better get the context.

Best
Mike

1 Like