qlik-request

1.1.6 • Public • Published

qlik-request

GitHub version npm version NPM monthly downloads Build Status Dependency Status Coverage Status

A set of helper functions to query the Qlik Sense REST endpoints

Author: Loïc Formont
License: MIT Licensed
Example

var qreq = require("qlik-request");

qreq.generateXrfKey([size], [chars]) ⇒ string

Generates a random Xrf key of a given size within a set of given chars

Kind: static method of qlik-request
Returns: string - the xrf key

Param Type Default Description
[size] int 16 the number of characters of the xrf key
[chars] string "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789" the characters from which to construct the key

Example

var xrf = qreq.generateXrfkey(8);

qreq.request(options, [params]) ⇒ Promise

Makes a request on a Qlik Sense API endpoint defined in the options object, posting the params object

Kind: static method of qlik-request
Returns: Promise - a promise resolving to the response to the request

Param Type Description
options options the options to connect to the API endpoint
[params] Object the parameters to post to the API endpoint

Example

qreq.request({
     restUri: 'https://10.76.224.72:4243/qps/ticket',
     pfx: pfx,
     passPhrase: ''
}, {
     'UserId': 'qlikservice',
     'UserDirectory': '2008R2-0',
     'Attributes': []
}).then(function(retVal) {
     console.log(retVal);
});

Readme

Keywords

none

Package Sidebar

Install

npm i qlik-request

Weekly Downloads

3

Version

1.1.6

License

MIT

Last publish

Collaborators

  • pouc