Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
MendyS
Partner - Creator III
Partner - Creator III

Send a API from visualization / extension into Qrs

Hi 

I am trying to send a API request into Qrs,

The purpose is to save the last click of the user about some topic like language, date format etc.

When user clicks on its preference, I want to save it into custom property (in the qrs?), and every running I will read it into var, and when the app is loaded the selection will present.

I am spend a lot of time with the documentation, foroms etc. any help will be appropriate.

Thanks 

Labels (5)
7 Replies
alex_colombo
Employee
Employee

Hey @MendyS , you cannot save this info into QRS. Based on your requirements, seems you need to first set and save language preferences, then apply them into a kind of default selections when Qlik app is opened, correct? 

For saving part, if you want to stay with native funcionalities, bookmarks could be a good choice, but users have to select their bookmakrs manually. 

Another option could be to create a custom extension which will read current selections on languages, and then store these info somewhere. Then Qlik app or extension it self can read these info during reload and apply selections on language prefernces.

MendyS
Partner - Creator III
Partner - Creator III
Author

Hi @alex_colombo 

Thanks for the answer.

what I want to do is enter the value into the Custom Property.
i found the method - qlik.callRepository that allows us to put and get the values from the Custom Property.
Today I saw the Qlik deprecated the method, so is there an option to connect to QRS API via JS in an extension?

alex_colombo
Employee
Employee

You can connect to QRS from JS code, but Custom Properties are not intended to be used for your use case. Custom Properties work into QMC for assign custom values then implement Securoty Rules for providing access to Qlik resources. From our doc "You create a custom property to be able to use your own values in the security rules. You define one or more values for the custom property, and use these in the security rule for a resource".

MendyS
Partner - Creator III
Partner - Creator III
Author

Hi @alex_colombo 
Thanks for the response,
can you show me an example of connecting to qrs api with js?
thanks a lot 

alex_colombo
Employee
Employee

Is this a JS connection from a front end app or a back end service? What is your authentication you would like to use and what is the current auth method set in virtual proxy?

From a JS point of view, using QRS is just a matter of making fetch calls to REST API endpoints. Biggest part is implementing authentication method.

MendyS
Partner - Creator III
Partner - Creator III
Author

Hi @alex_colombo ,
Is JS connection from a front end app,
the authentication is by user and XRF 
example of get an old API  - 

https://localhost/qrs/custompropertydefinition/full?xrfkey=VK2WknnKSnPNyxKB

alex_colombo
Employee
Employee

In your front end app, you are alredy authenticated with Qlik or calling the QRS is the first call against Qlik server?

Is you front end app a mashup which is running on Qlik server (under /extensions path)?