Getting tired of trying to connect to Qlik Sense API? The easiest way to connect with Qlik Sense. A lightful wrapper for Qlik Sense made by developer to developer :)
This package is designed to be the simplest way possible to connect to Qlik.
- Export Qlik Sense Certificates (qlik help documentation)
npm i qliksense-api --save
const qlikapi = require('qliksense-api')
let qlik = qlikapi.createClient({
key: "./certificates/client_key.pem", //path to certificates
cert: "./certificates/client.pem",
ca: "./certificates/root.pem"
})
qlik.getAbout().then((res)=>{
console.log(res)
})
or Async/Await :
let res = await qlik.getAbout()
console.log(res)
- qlik.getApps()
- qlik.getHealthCheck()
- qlik.getExecutionResult()
- qlik.getTaskLog(taskId) // return the last execution log
- qlik.getReloadTaskToken(taskId, fileReferenceID) //return the execution reload task token
- qlik.getExeutionLog(reloadTaskToken, taskName) // return the execution log
- qlik.doReloadTask('taskName') // reload task by name
- ... More to come
You can see the full list of QSR endpoints path here
const path = 'repositoryservice/full'
qlik.getQsr(path).then((res)=>{
console.log(res)
})
or Async/Await :
const path = 'repositoryservice/full'
let res = await qlik.getQsr(path)
console.log(res)
const path = 'task/start/synchronous?name=test'
qlik.postQsr('path').then((res)=>{
console.log(res)
})
The session solution allows the Qlik Sense Proxy Service (QPS) to use a session from an external system to validate who the user is.
let username = 'userExemple'
let userRepository = 'repositoryExemple'
qlik.generateSession(userRepository, username).then((res)=>{
console.log(res)
})
or Async/Await :
let username = 'userExemple'
let userRepository = 'repositoryExemple'
let res = await qlik.generateSession(userRepository, username)
console.log(res)
let sessionId = 'ed0671860b754b92df7c2e9c6cea4a7f'
qlik.getSession(sessionId).then((res)=>{
console.log(res)
})
or Async/Await :
let sessionId = 'ed0671860b754b92df7c2e9c6cea4a7f'
let res = await qlik.getSession(sessionId)
console.log(res)
let sessionId = 'ed0671860b754b92df7c2e9c6cea4a7f'
qlik.deleteSession(sessionId).then((res)=>{
console.log(res)
})
or Async/Await :
let sessionId = 'ed0671860b754b92df7c2e9c6cea4a7f'
let res = await qlik.deleteSession(sessionId)
console.log(res)
The Qlik Engine API consists of a set of objects representing apps, lists, and so on.
All the methods available can be found here
let method = 'GetDocList'
let params = []
qlik.engine(method, params).then((res)=>{
console.log(res)
})
or Async/Await:
let method = 'GetDocList'
let params = []
let res = await qlik.engine(method)
console.log(res)
All the methods available can be found here
let appId = '9586b50f-4df2-400e-8b4a-69874a7dcc3e'
let method = 'GetAllInfos'
let params = []
qlik.openDoc(appId, method, params).then((res)=>{
console.log(res)
})
or Async/Await:
let appId = '9586b50f-4df2-400e-8b4a-69874a7dcc3e'
let method = 'GetAllInfos'
let params = []
let res = await qlik.openDoc(appId, method, params)
console.log(res)
- Rodolfo Viola - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details