Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vinisefrin
Contributor II
Contributor II

Error Connect API

Good morning people,

Has anyone ever been in a situation like this?

We are trying to connect to a prospect client, however we need to extract the data from an API to work on Qlik, so we think about the REST connection.

The "client" passed us the connection URL, informed that the method is POST and we have to use 3 parameters:

• Token: which is a string of characters, used for validation

• Initial date

• Final date

We tried to make the connection via REST, but to no avail.

If we put these infos that they passed us in the fields of Query Parameters

query.png

Gives server error not found ...

erro_test.png

And if I leave without this information, it connects, but gives the error of missing parameters:

sucesso.png

falta parametros.png

According to the IT of this client, our request is arriving as a string, and should not, since the parameters have to arrive separate in the POST.

We tested the connection via Postman software, and it worked correctly, ie it is some Qlik config or syntax.

Has anyone seen this before? Do you know if Qlik can solve it?

Some people have commented to me that I need an intermediate extractor, in Python, PHP, for example, to connect to the API, generate files, and then consume with Qlik, if this makes my project unfeasible.

Thank you in advance for the strength

Hugs !

5 Replies
petter
Partner - Champion III
Partner - Champion III

Parameters from a POST request could be sent in any combination "Query Parameters", "Post Body" and "Query Headers"... So it is up to the specific API to define what is the right thing for the API endpoint that you are using.

IT told you that you have to put them in the POST body. This is not separate from the POST request but a part of the POST request. So make sure that you select in the Qlik REST Connector properties that the "Method" should be POST and not GET which is the default. Then you will get an input box underneath to fill in the POST body. How you put the parameters into the POST body depends on the API so you should have gotten that information already. It is in some sort of text format that could be like this maybe:

Token=asdklfjasdlfkjasdfldkjasdflfj

d1=xxxxxx

d2=yyyyyy

Again look at the documentation to determine the formatting of the text...

Qlik REST Connector should be perfectly capable to solve this...

vinisefrin
Contributor II
Contributor II
Author

Good morning, Petter,

what intrigues us is that via Postman the connection goes normally, only with the normal parameters ....

postman_ok.jpg

Via REST, we try with countless possibilities, all without success.

Thank you !

petter
Partner - Champion III
Partner - Champion III

Well what you see as form data in Postman is not query parameters... they are the post body and can be put into the Qlik REST Connector as such - then it should work well.

vinisefrin
Contributor II
Contributor II
Author

Thanks for the feedback Petter.

I'm doing this:

Screenshot_1.jpg

Screenshot_2.jpg

and yet it will not.

very strange.

thank you !

vinisefrin
Contributor II
Contributor II
Author

Petter, we were able to make the connection.

we sat down together with the client, and had to make some adjustments to their API.

now all right.

I thank you for the strength