App API
This API is reliable and breaking changes are unlikely.
qlik.app
The qlik.openApp method is the entry-point to the App API and it returns an app JavaScript object with methods to do work on the Qlik Sense app you connected to.
Version history
Each method and property contain information around when it was introduced, updated, deprecated or removed. A list of all relevant API changes per version release can be found in API version history.
Version state | Details |
---|---|
Introduced | 1.0 |
Getting started
You must connect to the Qlik Sense app containing the objects you want to display on your web page. You do this with the qlik.openApp method.
var config = {
host: 'QSE_domain',
prefix: '/',
port: 443,
isSecure: true,
webIntegrationId: 'web-integration-id-here' //only needed for SaaS editions
};
require(["js/qlik"], function(qlik) {
// open the app
var app = qlik.openApp('App file name or ID', config);
// insert Qlik objects into the page.
app.getObject(document.getElementById('LB01'), 'uPyZavD');
}
Examples of use
Learn what you can do with the App API.
Create action buttons
Working with widgets, you can add actions to execute when the buttons are clicked.
<div class="lui-buttongroup">
<lui-button ng-click="app.doReload()">Reload</lui-button>
<lui-button ng-click="app.back()">Back</lui-button>
<lui-button ng-click="app.forward()">Forward</lui-button>
<lui-button ng-click="app.clearAll()">Clear</lui-button>
<lui-button ng-click="app.lockAll()">Lock</lui-button>
<lui-button ng-click="app.unlockAll()">Unlock</lui-button>
</div>
Get an object and insert into an HTML element
Use the qlik.app.getObject method to get an object and insert it into an HTML element.
require( ["js/qlik"], function ( qlik ) {
qlik.setOnError(function(error) {
$("#error span").html(error.message);
$("#error").show();
$("#closeerror").on("click", function() {
$("#error").hide();
});
});
//open apps -- inserted here --
var app = qlik.openApp("App file name of ID", config);
//get objects -- inserted here --
app.getObject( 'QV01', 'hRZaKk', { noInteraction:true } );
} );