Giter Club home page Giter Club logo

qliksense-api's Introduction

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

qliksense-api's People

Contributors

matteoredaelli avatar rodolfoviolac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

qliksense-api's Issues

Module not found: Error: Can't resolve 'fs'

Hello,

I'm attempting to use your npm module on Angular 8.3.20 but I'm coming across this issue when starting the application. I'm aware you can't use 'fs' in later versions of Angular. Do you have any future plans to support Angular?

ERROR in ./node_modules/qliksense-api/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\lukea\Documents\GitHub\QPress\node_modules\qliksense-api'
Module not found: Error: Can't resolve 'fs' in 'C:\Users\lukea\Documents\GitHub\QPress\node_modules\qliksense-api\libs'
ERROR in ./node_modules/qliksense-api/libs/socketConnection.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\lukea\Documents\GitHub\QPress\node_modules\qliksense-api\libs'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.