qlik v3.0.5
qlik
This module facilitates easy integration between Qlik Sense Enterprise/Cloud and web applications by leveraging the Qlik Capability API. Developers can seamlessly connect to multiple Qlik Sense applications and interact with the Qlik Sense API using the utilities provided in this package. Qlik helper for more details & other API's
This module provides a set of utilities to streamline the interaction between your web applications and the Qlik Sense API.
Table of Contents
Features
- Simplifies connection to Qlik Sense environments
- Facilitates communication with multiple Qlik Sense applications
- Interacts with various Qlik Sense API endpoints
- Enhances development experience with Qlik Sense integrations
Installation
To install the Qlik Capability API Wrapper, use npm:
$ npm install qlik --save
Usage
Getting Started
To utilize this package, provide the basic information required for connecting to the Qlik Sense environment:
Import module
import Qlik from "qlik";
Define your connection to Qlik Sense Server and call the basic methods.
const qlikConfig = {
host: "localhost",
port: 80,
prefix: "/ticket/",
isSecure: false,
ticket: "qlikTicket=****", // Optional, for dynamic pass the ticket
webIntegrationId: "****", // For cloud integration
};
const qlik = new Qlik(qlikConfig);
Configuration Options
- host: The hostname of the Qlik Sense server.
- port: The port number for communication.
- prefix: The prefix for the Qlik Sense API URL.
- isSecure: Boolean indicating whether the connection is secure (HTTPS).
- ticket: (Optional) Qlik dynamic ticket-based authentication. Must be authenticate with particular virtual proxy, when you're not passing.
- webIntegrationId: (Optional) ID for qlik sense cloud integration
Functions
This module includes the following functions:
callRequire:
- Loads the requirejs and qlik-style.css dynamically based on config.
setQlik:
- Sets the instance of Qlik once the requirements are loaded.
authenticateToQlik:
- Supports authentication for cloud.
setAuthUser:
- Retrieves the authenticated user of the current application.
getSpaceList, getUserList, getAppList, getThemeList:
- Functions supporting cloud for retrieving lists of spaces, users, apps, and themes respectively.
getDocs, getList, getMeasure, getVariable, getFields, getBookmark, getQlikObjectTitles, getSheet, callObject, getApp:
- Functions supporting enterprise and cloud for retrieving various Qlik objects and data.
Example
Enterprise
sample module for react with qlik enterprise.
import React, { useState } from "react";
import Qlik from "qlik";
import { Box } from "@mui/material";
import Dashboard from "../components/dashboard";
import Header from "../components/header";
const App: React.FC = () => {
const [user, setUser] = useState<any>();
const qlik = new Qlik({
host: "localhost",
port: 80,
prefix: "/ticket/",
isSecure: false,
ticket: "qlikTicket=9byYoKhTnv9PP8aq",
});
qlik
.callRequire()
.then(async (q) => {
await qlik.setQlik();
await qlik.setAuthUser();
const { user } = qlik;
setUser(user);
})
.catch((err) => {
console.log(err);
});
return (
<Box>
<Header user={user} />
<Dashboard />
</Box>
);
};
export default App;
Before utilizing the Qlik Capability API Wrapper, it's necessary to create a virtual proxy in your Qlik Sense environment to configure the prefix and whitelist the host (localhost) and port (3000).
Explore the sample project here.
Cloud
sample module for react with qlik cloud.
import React, { useState } from "react";
import Qlik from "qlik";
import { Box } from "@mui/material";
import Dashboard from "../components/dashboard";
import Header from "../components/header";
const App: React.FC = () => {
const [user, setUser] = useState<any>();
const qlik = new Qlik({
host: "domain.name",
port: 443,
prefix: "/",
isSecure: true,
webIntegrationId: "**YoKhTnv9PP8aq",
});
qlik
.callRequire()
.then(async (q) => {
await qlik.setQlik();
await _qlik.authenticateToQlik();
await _qlik.setAuthUser();
const { user } = qlik;
setUser(user);
})
.catch((err) => {
console.log(err);
});
return (
<Box>
<Header user={user} />
<Dashboard />
</Box>
);
};
export default App;
Before utilizing the Qlik Capability API Wrapper, it's necessary to create a web integration id in your Qlik Sense environment to configure and whitelist the host (localhost) and port (3000).
Explore the sample project here.
Contribution
This library is still under construction and we are looking for contributors. If you like to contribute please contact me: ranvitranjit@gmail.com
License
1 month ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
10 months ago
10 months ago
9 months ago
9 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago