Qlik Community

Ask a Question

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
andrefpc
Partner
Partner

Rest Connection with POST Method

Hello community!

I'm struggling with the REST connector, hope you can help.

I'm trying to get data from VCount software. I'm able to retrieve data using Postman but unnable in Qlik Sense.

I believe the problem is in the url:

In Postman I use this URL: https://cloud.v-count.com/api/v4/vcountapi but I'm unable to use the same URL in Qlik Sense (bad request).

In Qlik Sense, a valid URL is https://cloud.v-count.com/api/v4/vcountapi/ (mind the '/' ate the end) but the response is the css used, not the actual data.

In Postman this URL https://cloud.v-count.com/api/v4/vcountapi works fine, if I use this one https://cloud.v-count.com/api/v4/vcountapi/ in Postman I get the same result as in Qlik Sense (the css formatting).

So basically, in Qlik Sense I'm unable to use an URL that works ok in Postman.

 

Any ideas?

Thanks in advance.

3 Replies
stevedark
Luminary Alumni
Luminary Alumni

Hi @andrefpc 

I'm getting a 400 every which way I look at this URL. Is it that you are sending some kind of authentication in PostMan which is not being sent via Sense.

If it is a simple API you are using (i.e. one without OAuth or similar) it is worth checking the URL in a browser as well.

Steve

andrefpc
Partner
Partner
Author

Hi @stevedark 

Thanks for your answer, there are some parameters that I send in Postman as well as in Qlik Sense, like starting and finish date, format, username and password.

Here are some samples of the requests:

Postman:

andrefpc_0-1605260766919.png

Qlik Sense REST Connector:

andrefpc_1-1605261004880.png

I've added a query header parameter as suggested in other post:

andrefpc_2-1605261073966.png

 

stevedark
Luminary Alumni
Luminary Alumni

Hi @andrefpc 

I would suggest passing the various parameters as separate query parameters, rather than as a single body block. I have not used the body text in Sense, so can't confirm whether it should work or not. I have had success passing things individually.

Suggest trying with the minimum number of parameters to get a result back, rather than going for all of them at once. I guess username and password are required, without other parameters you may still get a response?

I see in PostMan things are in the URL Encoded section, you may need to encode some of the values prior to plumbing into Sense.

Finding other REST examples on Qlik Community may help.

Good luck.

Steve