Skip to main content Skip to complementary content

Global API

Information noteIf you are using Qlik Sense Business or Qlik Sense Enterprise SaaS, see the API documentation at the Qlik (Developer Portal).
Information noteSTABLE.

This API is reliable and breaking changes are unlikely.

qlik.global

The qlik.global method is the entry point to the Global API. It returns a JavaScript object with global methods.

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 history
Version state Details
Introduced 1.1

Getting started with Qlik Sense Desktop and Qlik Sense Enterprise on Windows

You can open a WebSocket connection to the Qlik associative engine by calling the qlik.getGlobal method and get a JavaScript object in return, containing global methods.

getGlobal method

var config = {
	host: "myhost.com",
	prefix: "/",
	port: window.location.port,
	isSecure: true
};
var global = qlik.getGlobal(config);
global.getAuthenticatedUser(function(reply){
	alert('User:'+reply.qReturn);
});

Getting started with Qlik Sense SaaS

With Qlik Sense SaaS, you must first open an app before you can access the Global API.

var config = {
	host: "QSE_domain",
	prefix: "/",
	port: 443,
	isSecure: true,
	webIntegrationId: 'web_integration_ID'
};
var app = qlik.openApp('app_ID', config);
var global = app.global; 
global.getAuthenticatedUser(function(reply){
	alert('User:'+reply.qReturn);
});

Examples of use

Learn what you can do with the Global API.

Get the product version

You can get the product version with the getProductVersion method.

var config = {
	host: "myhost.com",
	prefix: "/",
	port: window.location.port,
	isSecure: true
};
var global = qlik.getGlobal(config);
//get the product version
global.getProductVersion(function(reply){
  alert('Product version:'+reply.qReturn);
});

Get a list of available apps

Use the getAppList method to get a list of available apps.

var config = {
  host: "myhost.com",
  prefix: "/",
  port: window.location.port,
  isSecure: true
};
var global = qlik.getGlobal(config);
//get list of available apps
global.getAppList(function(list){
  var str = "";
  $.each(list, function(key, value) {
    str +=  value.qDocName + "("+ value.qDocId +")";
  });
  alert(str);
});

Get info of the authenticated user

You can get info about the authenticated user.

var config = {
	host: "myhost.com",
	prefix: "/",
	port: window.location.port,
	isSecure: true
};
var global = qlik.getGlobal(config);
global.getAuthenticatedUser(function(reply){
	alert('User:'+reply.qReturn);
});

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!