NodeJS package to interact with multiple Qlik Sense REST API.
This is a generic client. This means that it exposes multiple "clients" (Engine, Proxy, Repository etc.) but these clients have only generic HTTP methods exposed (Get, Delete, Patch, Post and Put). All the required information (url, body data etc) have to be provided by the developer.
This package is the base for the other "client" specific packages and they are exposing a lot more methods.
Installation
npm install --save qlik-rest-api
Usage
import fs from "fs";
import https from "https";
import { QlikRepositoryClient } from "qlik-rest-api";
const httpsAgentCert = new https.Agent({
rejectUnauthorized: false, // if we want suppress certificate errors (like self-signed certificate error)
cert: fs.readFileSync(`path/to/client.pem`),
key: fs.readFileSync(`path/to/client_key.pem`),
});
const repoApi = new QlikRepositoryClient({
host: "my-qs-host",
port: 4242, // optional. default is 4242
httpsAgent: httpsAgentCert,
authentication: {
user_dir: "SOME_USER_DIR",
user_name: "SOME_USER_ID",
},
});
const tags = await repoApi.Get("tag").then(res => res.data);
console.log(tags) // array of tags
Documentation
Source code and documentation can be found at the package repository
Code documentation can be found here