Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
tanini
Contributor
Contributor

Calling a REST API

Hi,

Very very new on Qlik, but experienced with development and APIs.

I'm trying to query data from a REST API.

The process is twofold, first authenticate, grab a token in the response, then query the other APIs.

On postman I can authenticate fine, and grab a success json object with the session token I can use to query other APIs.

On click, I get a success=false and an empty token.

The query is super simple, POST to the api url with a json {"Login":"yadayada","Password":"password"} payload.

CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=http://url/api/login;timeout=30;method=POST;requestBody={%3Login%3:%3yadda%3,%3Password%3:%3password...;";
I've tried authSchema=anonymous as well without success.

Any help would be greatly appreciated 🙂

Labels (1)
1 Reply
jprdonnelly
Employee
Employee

@tanini - This previous post has a decent explanation of how to retrieve the token, then utilize it to dynamically connect to the second API endpoint.

The WITHCONNECTION keyword is the key, as it allows you to manipulate an existing connection with a different URL, headers, etc.

- @jprdonnelly