Capability APIs

qlik-embed: Where possible, use qlik-embed rather than this framework. Review the tutorial embedding Qlik Analytics using qlik-embed web components.

Capability APIs

The Capability APIs are a collection of JavaScript APIs that allow you to easily embed Qlik Sense content into a web app or portal. With just a few lines of code, it is possible to create a visualization that leverages the Qlik Sense visualization library. You can even interact with the engine to return data and metadata from an application. See Capability APIs for an overview and examples.

Prerequisites for using Capability API

  • JavaScript
  • AngularJS 1.8 (Long term support ended December 12, 2021)
  • require.js

Considerations

The Capability APIs use AngularJS and RequireJS, which are both global libraries with the potential to interact with the rest of your web app. jQuery is also loaded with the Capability APIs. This means if you use another version of jQuery in your web app, it will potentially be overwritten by the copy of jQuery loaded by the Capability APIs. CSS must also be loaded to use the Capability APIs, which has the potential to overwrite your own web app styles. These factors should be considered before using the Capability APIs. If any of these potential conflicts are an issue, consider using the App Integration API or Single Integration API. Both of these APIs use iFrames to embed Qlik Sense content into your page, effectively isolating your web app from library version conflicts. You could also consider creating a mashup with the Capability APIs and embedding the mashup in your web app in an iFrame to isolate it from the rest of your web app.

See Using AngularJS in your mashup for more information on integrating the Capability APIs into an existing AngularJS project.

Limitations

The following capability API methods are not supported when used with Qlik Cloud.

Capability APIMethods
Global API
  • getAppList()
  • getProductVersion()
  • getQTProduct()
  • isPersonalMode()
Root API
  • callRepository()
  • getAppList()
  • getExtensionList()
  • getGlobal()sessionApp()
  • sessionAppFromApp()
QVisualization API
  • exportData()
  • exportImg()
  • exportPdf()

Use cases best suited for Capability APIs

  • When you want to customize the Qlik experience to match your user interface.
  • When you want to customize the layout of Qlik objects without the overhead of multiple iFrames.
  • When you want to interact with Qlik directly, that is, without going through visualizations.
  • When you want to access the Qlik Sense client without using the Qlik Sense UI, that is, the selection model.

APIs for mashups

Qlik Sense comes with a number of Capability APIs that can be used for building mashups. Once your mashup is set up, you will have access to the qlik namespace. The qlik namespace provides all of the methods of the Root API. From there, you can use the openApp method to connect to a Qlik Sense app and get an app object with which you can use all of the methods of the App API. That is the general pattern of the Capability APIs.

Capability API nameNamespace
Root APIqlik
App APIqlik.app
Bookmark APIqlik.app.bookmark
Field APIqlik.app.field
Global APIqlik.global
Table APIqlik.table
Selection APIqlik.app.selectionState
Variable APIqlik.app.variable
Visualization APIqlik.app.visualization

Capability API examples

Was this page helpful?