Qlik Repository API

NodeJS/browser package to interact with Qlik Sense Repostory API (QSEoW)

Installation

npm install qlik-repo-api

Usage example

  • NodeJS example (certificates) that will get list of apps based on Repo API filter and then update all apps by adding tags and custom properties
import fs from "fs";
import https from "https";

import { QlikRepoApi } from "qlik-repo-api";

const cert = fs.readFileSync(`path/to/client.pem`);
const key = fs.readFileSync(`path/to/client_key.pem`);

const httpsAgentCert = new https.Agent({
  rejectUnauthorized: false,
  cert: cert,
  key: key,
});

const repoApi = new QlikRepoApi.client({
  host: "sense-instance.com",
  port: 4242, //default 4242
  httpsAgent: httpsAgentCert,
  authentication: {
    user_dir: "SOME_USER_DIR",
    user_name: "SOME_USER_ID",
  },
});

// get list of apps with their name is starting with "License"
// GET qrs/app?filter=name sw 'License'
const filterApp = await repoApi.apps.getFilter({
  filter: `name sw 'License'`,
});

// loop through the apps list and update them
const updateResponse = await Promise.all(
  filterApp.map((app) =>
    app.update({
      tags: ["tag-name-1", "tag-name-2"],
      customProperties: [
        "customProperty1=value1",
        "customProperty1=value2",
        "customProperty2=some-value",
      ],
    })
  )
);

Documentation

Source code and documentation can be found at the package repository and wiki page

Code documentation can be found at this page

You've successfully subscribed to I N F O R M A T I Q A L
Great! Next, complete checkout for full access to I N F O R M A T I Q A L
Welcome back! You've successfully signed in.
Unable to sign you in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.