Skip to content

Instantly share code, notes, and snippets.

// Create a Generic Object that contains multiple generic objects.
var qsocks = require('qsocks');
//Connect to Qlik Sense Desktop
qsocks.Connect().then(function(global) {
//Open document Sales Discovery
global.openDoc('Sales Discovery.qvf').then(function(app) {
@mindspank
mindspank / basichart.js
Created August 4, 2015 22:17
ListObjectDef and HyperCubeDef in a extension initial properties
define(["jquery"], function ($) {
return {
initialProperties: {
version: 1.0,
qHyperCubeDef: {
qDimensions: [],
qMeasures: [],
qInitialDataFetch: [{
qWidth: 2,
qHeight: 50
@mindspank
mindspank / gist:ff8b2cebac911a622477
Created July 10, 2015 16:23
Reload Task By Name - QRS API
/**
* Connects to the QRS API (REST based) using certificates.
* See this article for more information about connecting to QRS https://help.qlik.com/sense/2.0/en-us/developer/Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-Connect-API.htm
*
*/
var https = require('https');
var fs = require('fs');
@mindspank
mindspank / QRS-Listapps.js
Created July 2, 2015 20:26
QRS-Listapps.js
/**
* Connects to the QRS API (REST based) using certificates.
* See this article for more information about connecting to QRS https://help.qlik.com/sense/2.0/en-us/developer/Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-Connect-API.htm
*
*/
var https = require('https');
var fs = require('fs');
@mindspank
mindspank / QES-qsocks-connect.js
Last active August 29, 2015 14:24
QES-qsocks-connect.js
var qsocks = require('qsocks');
var fs = require('fs');
var request = require('request');
// Set our request defaults, ignore unauthorized cert warnings as default QS certs are self-signed.
// Export the certificates from your Qlik Sense installation and refer to them
var r = request.defaults({
rejectUnauthorized: false,
host: 'usrad-akl',
key: fs.readFileSync(__dirname + '/client_key.pem'),
@mindspank
mindspank / QES-NoProxy-Certs.js
Last active March 31, 2017 11:25
QES-NoProxy-Certs.js
var WebSocket = require('ws');
var fs = require('fs');
var ws = new WebSocket('wss://usrad-akl:4747/app/', {
origin: 'https://usrad-akl', // <- This origin has to be in the WebSocket White list of Qlik Sense
cert: fs.readFileSync(__dirname + '/client.pem'),
key: fs.readFileSync(__dirname + '/client_key.pem'),
headers: {
'X-Qlik-User': 'UserDirectory=Internal;UserId=sa_repository' // Passing a user to QIX to authenticate as
},
@mindspank
mindspank / gist:d410e67953a62f305199
Created June 8, 2015 13:54
Multiple scoped connections with qsocks
var CORE = {
host: 'sense-demo.qlik.com',
isSecure: true,
appname: null
};
var APP1 = {
host: 'sense-demo.qlik.com',
isSecure: true,
appname: '5621cc5b-0bad-49d8-94c3-bef3aa5d8e84'
var Data = {
title: 'Member State',
row: [{
state: 'S',
qText: 'Europe'
},{
state: 'S',
qText: 'Asia'
},{
state: 'S',
/* Workbench */
Qv.InitWorkBench({
View: 'FirstVersion',
Host: null,
Anonymous: true,
BodyOnLoadFunctionNames: ['init'],
InitialSelections: ['LB137,Moderaterna']
});
@mindspank
mindspank / gist:e1c51c04c7a7053e19f3
Last active December 9, 2016 10:11
Qlik Sense API overview

Qlik Sense Proxy Service API, Qlik Sense Repository Service API and Qlik Sense User Directory Connector API are REST API and can be consumed from all languages and environments that supports REST.

Qlik Sense QVX SDK and Qlik Sense .Net SDK are .Net libraries that can be consumed from all languages and environments that supports .Net such as the Windows plattform.

The Qlik Sense Backend, Extension and Mashup API are javascript libraries.

The Qlik Sense Engine API is a web socket API that can be consumed by all languages and environments that supports web socket.