Global API

Note: STABLE.
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

Introduced 1.1

Getting started

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);
});

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.

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 information help you?

Can you tell us why it did not help you and how we can improve it?