<?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: Attaching to WebSocket connection for mashup in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Attaching-to-WebSocket-connection-for-mashup/m-p/2483015#M21292</link>
    <description>&lt;P&gt;Hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/149946"&gt;@frankpacker_AoD&lt;/a&gt;&lt;/SPAN&gt; you can leverage the websocket created by Capability APIs and requireJS. Capability APIs are a wrapper on top of Engine APIs and you can access them using qlik.qlikApp.model.enigmaModel. Below and example of accessing it, remember to wait promise from enigmaModel, this is telling you when Engine APIs are ready to be used.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
 &lt;P&gt;&lt;SPAN style="color:rgb(0,119,170);"&gt;await&lt;/SPAN&gt; qlikApp&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;model&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;enigmaModel&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;waitForOpen&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;promise;&lt;/P&gt;
 &lt;P&gt;const bookmark = await qlikApp&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;model&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;enigmaModel.createBookmarkEx(...);&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Mon, 23 Sep 2024 12:40:37 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2024-09-23T12:40:37Z</dc:date>
    <item>
      <title>Attaching to WebSocket connection for mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Attaching-to-WebSocket-connection-for-mashup/m-p/2482840#M21288</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Looking for some tips on how I can get hold of the WebSocket connection that Qlik establishes in a mashup so that I can use it to communicate with the JSON API - specifically, I need to use the &lt;A href="https://help.qlik.com/en-US/sense-developer/May2024/Subsystems/EngineJSONAPI/Content/service-doc-createbookmarkex.htm" target="_self"&gt;CreateBookmarkEx&lt;/A&gt; method, since it saves layout where the ordinary method does not.&lt;/P&gt;
&lt;P&gt;I have two different deployments with the same need. One is a 'traditional' mashup that imports js/qlik using RequireJS and sets up the 'qlik' object containing the WebSocket and the other is using EnigmaJS, which creates the Enigma 'session' object. Both of these have the WebSocket connection within them, and I just need to get hold of that so that I can execute and listen to responses for the sorts of commands like those detailed &lt;A href="https://help.qlik.com/en-US/sense-developer/May2024/Subsystems/EngineAPI/Content/Sense_EngineAPI/DiscoveringAndAnalysing/Bookmarks/create-and-apply-bookmark.htm" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I can set up a separate WebSocket connection, and this works to an extent, but when fetched, the doc has a new handle and as such things like selections in bookmarks etc are not dealt with correctly.&lt;/P&gt;
&lt;P&gt;Hoping someone knows a way to get hold of the underlying WebSocket connection and make use of it like any other JavaScript WebSocket.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2024 23:44:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Attaching-to-WebSocket-connection-for-mashup/m-p/2482840#M21288</guid>
      <dc:creator>frankpacker_AoD</dc:creator>
      <dc:date>2024-09-20T23:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Attaching to WebSocket connection for mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Attaching-to-WebSocket-connection-for-mashup/m-p/2483015#M21292</link>
      <description>&lt;P&gt;Hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/149946"&gt;@frankpacker_AoD&lt;/a&gt;&lt;/SPAN&gt; you can leverage the websocket created by Capability APIs and requireJS. Capability APIs are a wrapper on top of Engine APIs and you can access them using qlik.qlikApp.model.enigmaModel. Below and example of accessing it, remember to wait promise from enigmaModel, this is telling you when Engine APIs are ready to be used.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
 &lt;P&gt;&lt;SPAN style="color:rgb(0,119,170);"&gt;await&lt;/SPAN&gt; qlikApp&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;model&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;enigmaModel&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;waitForOpen&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;promise;&lt;/P&gt;
 &lt;P&gt;const bookmark = await qlikApp&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;model&lt;SPAN style="color:rgb(153,153,153);"&gt;.&lt;/SPAN&gt;enigmaModel.createBookmarkEx(...);&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 23 Sep 2024 12:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Attaching-to-WebSocket-connection-for-mashup/m-p/2483015#M21292</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-09-23T12:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Attaching to WebSocket connection for mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Attaching-to-WebSocket-connection-for-mashup/m-p/2483079#M21301</link>
      <description>&lt;P&gt;Perfect. Thanks Alex!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 22:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Attaching-to-WebSocket-connection-for-mashup/m-p/2483079#M21301</guid>
      <dc:creator>frankpacker_AoD</dc:creator>
      <dc:date>2024-09-23T22:58:28Z</dc:date>
    </item>
  </channel>
</rss>

