Registry / analytics / qlik-rest-api

qlik-rest-api

JSON →
library1.8.6jsnpmunverified

A Node.js client library for interacting with multiple Qlik Sense REST APIs including Repository, Proxy, Engine, and SaaS from a single package. Version 1.8.6 is the latest stable release; actively maintained on GitHub with regular updates. Ships TypeScript types. Key differentiators: supports multiple authentication mechanisms (certificates, header, JWT) without performing authentication itself, provides a unified response format, and requires physical files (certificates, qvf files) to be provided in advance rather than reading them from the filesystem.

npm install qlik-rest-api
INSTALL
IMPORT
SIG · QLIK-REST-API
Q
qlik-rest-api
analyticsjavascriptv1.8.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QlikRepositoryClient
import { QlikRepositoryClient } from 'qlik-rest-api'
const QlikRepositoryClient = require('qlik-rest-api').QlikRepositoryClient
ESM-only since v1; named import. CommonJS require works but with .default or destructuring.
QlikProxyClient
import { QlikProxyClient } from 'qlik-rest-api'
import QlikProxyClient from 'qlik-rest-api'
Named export, not default. CommonJS require can be used: const { QlikProxyClient } = require('qlik-rest-api');
QlikEngineClient
import { QlikEngineClient } from 'qlik-rest-api'
const QlikEngineClient = require('qlik-rest-api').QlikEngineClient
Same pattern as other clients. Ensure you use the correct HTTPS agent configuration.
QlikSaaSClient
import { QlikSaaSClient } from 'qlik-rest-api'
import { QlikSaaSClient } from 'qlik-rest-api/qaas'
Available for SaaS API interactions. No separate path.
QlikGenericClient
import { QlikGenericClient } from 'qlik-rest-api'
Generic client for custom endpoints. Use only if others don't fit.

Demonstrates creating a QlikRepositoryClient with certificate authentication and fetching apps filtered by name prefix.

import fs from 'fs'; import https from 'https'; import { QlikRepositoryClient } from 'qlik-rest-api'; const cert = fs.readFileSync('path/to/client.pem'); const key = fs.readFileSync('path/to/client_key.pem'); const httpsAgent = new https.Agent({ rejectUnauthorized: false, cert: cert, key: key }); const config = { host: 'my-sense-host.com', port: 4242, httpsAgent: httpsAgent, authentication: { user_dir: 'SOME_DIR', user_name: 'SOME_USER' } }; const repoClient = new QlikRepositoryClient(config); async function listApps() { const result = await repoClient.Get('app?filter=(name sw \'operations\')'); console.log(result.data); } listApps();
Debug
Known issues
gotchaThe package does not read certificate files from the filesystem; you must read them yourself using fs.readFileSync or similar before passing to https.Agent.
fix
Always provide pfx, cert, or key as buffers from your own file read.
affects: >=1.0.0
breakingNode version >= 14.19.1 required, but README recommends >=16.0.0
fix
Use Node 16+ or check engine field in package.json.
affects: >=1.0.0
gotchaAuthentication headers/certificates must be pre-configured; the package does not handle authentication flows internally.
fix
Ensure authentication.user_dir and authentication.user_name are correct for your Qlik Sense environment.
affects: >=1.0.0
deprecatedThe configuration property 'httpAgent' is deprecated in favor of 'httpsAgent' for HTTPS connections.
fix
Use httpsAgent for all HTTPS connections; httpAgent may be removed in future versions.
affects: >=1.5.0
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'data')
Async call without await or using .then incorrectly, or missing error handling.
fix
Use await when calling Get() method: const result = await client.Get('path');
Error: unable to verify the first certificate
Invalid or missing SSL certificate; rejectUnauthorized set to true (default) with self-signed certs.
fix
Set rejectUnauthorized: false in https.Agent options for development environments.
Module not found: Error: Can't resolve 'qlik-rest-api'
Package not installed or wrong import path.
fix
Run 'npm install --save qlik-rest-api' and use correct import: 'import { QlikRepositoryClient } from 'qlik-rest-api';
Upgrade
Version history
1.8.6latest on npm
Audit
Dependencies
httpsoptionalRequired to create HTTPS agents with certificates for authentication
fsoptionalUsed to read certificate files from the filesystem
Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
qlik-rest-api — npm install qlik-rest-api · libregistry