npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qliksense-api

v1.4.0

Published

Best Wrapper For Qlik Sense API, This package is designed to be the simplest way possible to connect to Qlik Sense.

Downloads

59

Readme

Best Wrapper For Qlik Sense API

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 :)

IMPORTANT - This package is under construction, feel free to contribuite, open issues or contact.

Getting Started

This package is designed to be the simplest way possible to connect to Qlik.

Prerequisites

Installing


npm i qliksense-api --save

Starting


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

QSR

Get /about Path

qlik.getAbout().then((res)=>{
    console.log(res)
})

or Async/Await :

let res = await qlik.getAbout()
console.log(res)

Get Functions:

  • 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

Post Functions:

  • qlik.uploadApp(name, filePath) // return the new uploaded app
  • qlik.replaceApp(id,appid) // Replace an app, identified by {appid}, with the app identified by {id}.
  • qlik.publishApp(id,streamId, name) // Publish an existing app, identified by {id}, to the stream identified by {streamid}. Optionally, provide a {name} for the app.
  • qlik.deleteApp(id) // Delete the app by id

Get QSR Generic Path

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)

Post QSR Generic Path

const path = 'task/start/synchronous?name=test'
 qlik.postQsr('path').then((res)=>{
     console.log(res)
 })

QPS

Generating Session

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)

Get Session

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)

Delete Session

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)

Qlik Engine API

The Qlik Engine API consists of a set of objects representing apps, lists, and so on.

Qlik Engine API - DOC

Global Class

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)

App Class

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)

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details