<?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: how to execute Nodejs javascript code through Qlik sense Extesion in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433872#M9007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain what does the NodeJs code actually do and where it is located? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Sep 2017 07:35:03 GMT</pubDate>
    <dc:creator>Vincenzo_Esposito</dc:creator>
    <dc:date>2017-09-29T07:35:03Z</dc:date>
    <item>
      <title>how to execute Nodejs javascript code through Qlik sense Extesion</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433869#M9004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have javascript code running on Nodejs. Now i want to execute it from Qlik sense Extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way we can embed Nodejs code in Qlik sense extension?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapnil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 13:19:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433869#M9004</guid>
      <dc:creator>swapnil_kumbhar</dc:creator>
      <dc:date>2017-09-28T13:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to execute Nodejs javascript code through Qlik sense Extesion</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433870#M9005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;QlikSense Extension code run on the client browser, whereas the Node.Js code typically run on server, in the backend. You can interact with the backend code for instance through a REST API call&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 17:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433870#M9005</guid>
      <dc:creator>Vincenzo_Esposito</dc:creator>
      <dc:date>2017-09-28T17:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to execute Nodejs javascript code through Qlik sense Extesion</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433871#M9006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincenzo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way we can execute Nodejs code by creating Button object in Qlik Sense Extension &amp;amp; On click of that button we can execute the NodeJs code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also Is there any way to integrate the Nodejs webserver in Qlik sense(Like IIS) to execute the Nodejs code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapnil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 05:24:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433871#M9006</guid>
      <dc:creator>swapnil_kumbhar</dc:creator>
      <dc:date>2017-09-29T05:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to execute Nodejs javascript code through Qlik sense Extesion</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433872#M9007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain what does the NodeJs code actually do and where it is located? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 07:35:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433872#M9007</guid>
      <dc:creator>Vincenzo_Esposito</dc:creator>
      <dc:date>2017-09-29T07:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to execute Nodejs javascript code through Qlik sense Extesion</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433873#M9008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincenzo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Nodejs code &amp;amp; Qlik sense server are located on same machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Nodejs code to:&lt;/P&gt;&lt;P&gt;1. Connect to Qlik sense API's&lt;/P&gt;&lt;P&gt;2. Authenticate to Qlik using Certificate&lt;/P&gt;&lt;P&gt;3. Create App &amp;amp; Stream&lt;/P&gt;&lt;P&gt;4. Load data into app&lt;/P&gt;&lt;P&gt;5. Publish app to stream created&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently we are able to execute above steps from Nodejs Command Prompt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We&amp;nbsp; are looking for Solution or some Techniques through which we can execute Nodejs Javascript code from Browser or Qlik extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have tried executing code using Browserify but we are getting Certificate related issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is Sample code we have used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Sample.js &lt;/P&gt;&lt;P&gt;var qsocks = require('qsocks');&lt;/P&gt;&lt;P&gt;var fs = require('fs');&lt;/P&gt;&lt;P&gt;var request = require('request');&lt;/P&gt;&lt;P&gt;var https=require('https');&lt;/P&gt;&lt;P&gt;var User = "LoginUserName";&lt;/P&gt;&lt;P&gt;var Token = "";&lt;/P&gt;&lt;P&gt;var AppId = "";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Set our request defaults, ignore unauthorized cert warnings as default QS certs are self-signed.&lt;/P&gt;&lt;P&gt;var requestDefaults = request.defaults({&lt;/P&gt;&lt;P&gt;rejectUnauthorized: false,&lt;/P&gt;&lt;P&gt;host: 'Hostname',//'Hostname',&lt;/P&gt;&lt;P&gt;pfx: fs.readFileSync("client.pfx")&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Authenticate whatever user you want&lt;/P&gt;&lt;P&gt;var auth_user = JSON.stringify({&lt;/P&gt;&lt;P&gt;"UserDirectory": 'Hostname',&lt;/P&gt;&lt;P&gt;"UserId": 'Username',&lt;/P&gt;&lt;P&gt;"Attributes": []&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;getTicket();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Get Ticket Function : To Connect to Proxy API for authentication &amp;amp; Create app&lt;/P&gt;&lt;P&gt;function getTicket(){&lt;/P&gt;&lt;P&gt;//Get ticket for user&lt;/P&gt;&lt;P&gt;requestDefaults.post({&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;uri: '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://Hostname:4243/qps/ticket?xrfkey=abcdefghijklmnop" rel="nofollow" target="_blank"&gt;https://Hostname:4243/qps/ticket?xrfkey=abcdefghijklmnop&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;body: auth_user,&lt;/P&gt;&lt;P&gt;headers:{&lt;/P&gt;&lt;P&gt;'x-qlik-xrfkey': 'abcdefghijklmnop',&lt;/P&gt;&lt;P&gt;'content-type': 'application/json'&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;function(err, res, body) {&lt;/P&gt;&lt;P&gt;//Consume ticket, set cookie response in our upgrade header against the proxy.&lt;/P&gt;&lt;P&gt;var ticket = JSON.parse(body)['Ticket'];&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;requestDefaults.get( '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://Hostname/hub/?qlikTicket=" rel="nofollow" target="_blank"&gt;https://Hostname/hub/?qlikTicket=&lt;/A&gt;&lt;SPAN&gt;' + ticket, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;function(error, response, body) &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;var cookies = response.headers['set-cookie'];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//qsocks config, merges into standard https/http object headers.&lt;/P&gt;&lt;P&gt;//Set the session cookie correctly.&lt;/P&gt;&lt;P&gt;var config ={&lt;/P&gt;&lt;P&gt;host: 'Hostname/app/',&lt;/P&gt;&lt;P&gt;isSecure: true,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;origin: '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost" rel="nofollow" target="_blank"&gt;http://localhost&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;rejectUnauthorized: false,&lt;/P&gt;&lt;P&gt;headers:{&lt;/P&gt;&lt;P&gt;"Content-Type": "application/json",&lt;/P&gt;&lt;P&gt;"Cookie": cookies[0]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;console.log('Get Ticket Connecting');&lt;/P&gt;&lt;P&gt;qsocks.Connect(config).then(function(global) &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;console.log(User)&lt;/P&gt;&lt;P&gt;console.log('Create App');&lt;/P&gt;&lt;P&gt;global.createApp(User, 'First Script Tab')&lt;/P&gt;&lt;P&gt;.then(() =&amp;gt; {&lt;/P&gt;&lt;P&gt;// Close our connection.&lt;/P&gt;&lt;P&gt;return global.connection.close();&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;P&gt;.catch( err =&amp;gt; {&lt;/P&gt;&lt;P&gt;// Failed to create app. In Desktop application names are unique.&lt;/P&gt;&lt;P&gt;console.log( err )&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;P&gt;console.log('Create App done!');&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;P&gt;.then(() =&amp;gt; {&lt;/P&gt;&lt;P&gt;console.log('Get Ticket Done!')&lt;/P&gt;&lt;P&gt;//createStream();&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;P&gt;})&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swapnil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 08:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433873#M9008</guid>
      <dc:creator>swapnil_kumbhar</dc:creator>
      <dc:date>2017-09-29T08:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to execute Nodejs javascript code through Qlik sense Extesion</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433874#M9009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;You're getting over complicating simple thinks. Have a look to the widgets.&amp;nbsp;&lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/Extensions/Content/widgets-introduction.htm"&gt;http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/Extensions/Content/widgets-introduction.htm&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;As far as I remember the snippet example code already has the case you want to use&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 17:59:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/how-to-execute-Nodejs-javascript-code-through-Qlik-sense/m-p/1433874#M9009</guid>
      <dc:creator>Vincenzo_Esposito</dc:creator>
      <dc:date>2017-09-29T17:59:59Z</dc:date>
    </item>
  </channel>
</rss>

