If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hello Everyone,
We have an app which fetches the data from a table (oracle) and its being updated in an hourly basis on the qliksense with a task reload. No issues so far. My question is the followinhg
Does Qliksense have RESTAPI capabilities to query an app and its contents ?
for example, in the Sales app in sheet1 under monthly sales chart give me the value of Sales Metric for 2020june?
Do the qliksense have such kind of capablities to get these kind of details through RESTAPI.
Please post me if any documentations available.
Best Regards
Vamsi
Hello Vamsi,
The content you mentioned is reachable through engine servise, and engine service uses JSON API not REST API.
By using enigmaJS you have to create a wrapper REST API server:
You can create your own REST server as I described above with NodeJS, or you can use ready solutions in the garden like the one below:
https://developer.qlik.com/garden/5755ef8cbf31b5bc5a7c373b
HI @SerhanKaraer ,
Hi @SerhanKaraer ,
Thanks for your response. I have installed node js and enigma js. Thereafter , i tried making connection to websocket for qliksense enterprise but it returned me error. Can you please check and point me to the correct stream to get this authentication issues resolved.
PS C:\Users\AAAA> node C:\Users\bbb\Desktop\nodejs\my-file2.js
Something went wrong 😞 ErrorEvent {
[Symbol(kTarget)]: WebSocket {
_events: [Object: null prototype] {
open: [Function],
close: [Function],
error: [Function],
message: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
_binaryType: 'nodebuffer',
_closeCode: 1006,
_closeFrameReceived: false,
_closeFrameSent: false,
_closeMessage: <Buffer >,
_closeTimer: null,
_extensions: {},
_paused: false,
_protocol: '',
_readyState: 3,
_receiver: null,
_sender: null,
_socket: null,
_bufferedAmount: 0,
_isServer: false,
_redirects: 0,
_url: 'wss://localhost:4747/app/',
_req: null,
[Symbol(kCapture)]: false
},
[Symbol(kType)]: 'error',
[Symbol(kError)]: Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1545:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket._finishInit (node:_tls_wrap:959:8)
at ssl.onhandshakedone (node:_tls_wrap:743:12) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
Hello Vamsi,
Something is wrong with your certificates. It must look like this:
enigma.create({
schema,
url: `wss://localhost:4747/app/`,
createSocket: url => new WebSocket(url, {
key: certificate.key,
cert: certificate.cert,
rejectUnauthorized: false,
headers: { "X-Qlik-User": `UserDirectory=${userDirectory}; UserId=${userId}` }
})
})