<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accessing Engine API in Qlik Sense Desktop from Node.js in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-Engine-API-in-Qlik-Sense-Desktop-from-Node-js/m-p/1261672#M6899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connecting to Qlik Sense Desktop should be fairly straight forward, you just need to change your config to something like this:&lt;/P&gt;&lt;PRE&gt;config: {
&amp;nbsp; unsecure: true, 
&amp;nbsp; host: "localhost",
&amp;nbsp; port: 4848
}
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also don't need the certs in your connection as Desktop doesn't require any authentication and, lastly, your node server needs to be running on localhost as Sense Desktop won't accept connections from anywhere else. Given your description above I imagine that that's the case anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In theory that should be it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2017 15:07:36 GMT</pubDate>
    <dc:creator>websy1985</dc:creator>
    <dc:date>2017-03-22T15:07:36Z</dc:date>
    <item>
      <title>Accessing Engine API in Qlik Sense Desktop from Node.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-Engine-API-in-Qlik-Sense-Desktop-from-Node-js/m-p/1261671#M6898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a Node.js solution which I've developed which uses the Engine API, wrapped by the marvellous Enigma.js, connecting to a QAP server instance to build and delete new apps on the fly according to given criteria.&lt;/P&gt;&lt;P&gt;It's all working beautifully in this environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Today I tried to port this to my laptop so I could 1) Develop on the move and 2) Show off the rather exciting possibilities such a solution offers. However I hit snags around authentication. My laptop has Desktop on it, not any of the Server versions. &lt;/P&gt;&lt;P&gt;Is it actually possible to do this - Node.js talking to Qlik Sense Desktop - or is this restricted? The configuration I pass to Enigma is included below. What needs to be different to connect to Qlik Sense Desktop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; schema: qixSchema,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; session: {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsecure: false,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host: qConfig.hostName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; port: qConfig.QlikServicePort&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; createSocket: (url) =&amp;gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new WebSocket(url, {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; origin: qConfig.hostPrefix + qConfig.hostName, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cert: fs.readFileSync(qConfig.certDir + qConfig.certPem),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key: fs.readFileSync(qConfig.certDir + qConfig.keyPem),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers: {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'X-Qlik-User': qConfig.header + qConfig.QlikServiceDirectory + qConfig.middle + qConfig.QlikServiceUser &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rejectUnauthorized: false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 14:50:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-Engine-API-in-Qlik-Sense-Desktop-from-Node-js/m-p/1261671#M6898</guid>
      <dc:creator>justin_morley</dc:creator>
      <dc:date>2017-03-22T14:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Engine API in Qlik Sense Desktop from Node.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-Engine-API-in-Qlik-Sense-Desktop-from-Node-js/m-p/1261672#M6899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connecting to Qlik Sense Desktop should be fairly straight forward, you just need to change your config to something like this:&lt;/P&gt;&lt;PRE&gt;config: {
&amp;nbsp; unsecure: true, 
&amp;nbsp; host: "localhost",
&amp;nbsp; port: 4848
}
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also don't need the certs in your connection as Desktop doesn't require any authentication and, lastly, your node server needs to be running on localhost as Sense Desktop won't accept connections from anywhere else. Given your description above I imagine that that's the case anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In theory that should be it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 15:07:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-Engine-API-in-Qlik-Sense-Desktop-from-Node-js/m-p/1261672#M6899</guid>
      <dc:creator>websy1985</dc:creator>
      <dc:date>2017-03-22T15:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Engine API in Qlik Sense Desktop from Node.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-Engine-API-in-Qlik-Sense-Desktop-from-Node-js/m-p/1261673#M6900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Because I'm running Enigma from Node.js and not a browser, it crashes with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TypeError: this.createSocket is not a function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at RPC.open (C:\temp\QAPService\QAPService\node_modules\enigma.js\dist\enig&lt;/P&gt;&lt;P&gt;a.js:2372:29)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should my createSocket function look like?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 16:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Accessing-Engine-API-in-Qlik-Sense-Desktop-from-Node-js/m-p/1261673#M6900</guid>
      <dc:creator>justin_morley</dc:creator>
      <dc:date>2017-03-22T16:00:50Z</dc:date>
    </item>
  </channel>
</rss>

