Backend API
Similar to the QSocks example, Qlik's Backend API is a wrapper around selected Qlik Engine API methods, but with the difference that the Backend API is aware of the context, which is a WebSocket user session with the current Qlik Sense app.
This means, for example, that if you were to leverage the Backend API to pass on a selection within a visualization extension, the Backend API would utilize the current WebSocket connection and the app in which the extension is used to pass on the selection, for example, via the selectValues
method:
var self = this; $element.find('li').on('click',function(){ if(this.hasAttribute("data-value")){ var value =parseInt(this.getAttribute("data-value"),10), dim =0; self.backendApi.selectValues(dim, [value],true); } });
Using the this
context (named as self
within the function), the Backend API immediately assumes the existing app and the WebSocket connection to pass on the selection to the Qlik Engine API.
Typical examples of...