<?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 Get Status and completed values from NPrinting Task using REST API in Qlik NPrinting</title>
    <link>https://community.qlik.com/t5/Qlik-NPrinting/Get-Status-and-completed-values-from-NPrinting-Task-using-REST/m-p/1572768#M23669</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please help us to fetch the Status and&amp;nbsp;&lt;SPAN&gt;Completed data from the NPrinting API. you can use any host &amp;amp; NPrinting Task Id in below url.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://qanavpc-nprt.jnj.com/api/v1/tasks/45a1deaa-0f0d-47f7-aa1b-6a5c19f84ca2/executions" target="_blank" rel="noopener"&gt;REST API : https://host/api/v1/tasks/taskid/executions&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 234px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10585i1E4BA90E7A673AA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;QLik Script:&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'NPrinting REST_POST';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;let vPublshTaskURL = '&lt;A href="https://host/api/v1/tasks/'&amp;amp;'$(vTaskId)'&amp;amp;'/executions" target="_blank"&gt;https://host/api/v1/tasks/'&amp;amp;'$(vTaskId)'&amp;amp;'/executions&lt;/A&gt;';&lt;/P&gt;&lt;P&gt;RestNPTaskTriggerTable:&lt;BR /&gt;SQL SELECT&lt;BR /&gt;"__KEY_data"&lt;BR /&gt;FROM JSON (wrap off) "data" PK "__KEY_data"&lt;BR /&gt;WITH CONNECTION( URL "$(vPublshTaskURL)", HTTPHEADER "cookie" "$(vCookie)");&lt;/P&gt;&lt;P&gt;[_post_items]:&lt;BR /&gt;LOAD [__KEY_data] AS [__KEY_data]&lt;BR /&gt;RESIDENT RestNPTaskTriggerTable&lt;BR /&gt;WHERE NOT IsNull([__KEY_data]);&lt;BR /&gt;DROP TABLE RestNPTaskTriggerTable;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:46:23 GMT</pubDate>
    <dc:creator>satishsure</dc:creator>
    <dc:date>2024-11-16T03:46:23Z</dc:date>
    <item>
      <title>Get Status and completed values from NPrinting Task using REST API</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Get-Status-and-completed-values-from-NPrinting-Task-using-REST/m-p/1572768#M23669</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please help us to fetch the Status and&amp;nbsp;&lt;SPAN&gt;Completed data from the NPrinting API. you can use any host &amp;amp; NPrinting Task Id in below url.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://qanavpc-nprt.jnj.com/api/v1/tasks/45a1deaa-0f0d-47f7-aa1b-6a5c19f84ca2/executions" target="_blank" rel="noopener"&gt;REST API : https://host/api/v1/tasks/taskid/executions&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 234px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/10585i1E4BA90E7A673AA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;QLik Script:&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'NPrinting REST_POST';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;let vPublshTaskURL = '&lt;A href="https://host/api/v1/tasks/'&amp;amp;'$(vTaskId)'&amp;amp;'/executions" target="_blank"&gt;https://host/api/v1/tasks/'&amp;amp;'$(vTaskId)'&amp;amp;'/executions&lt;/A&gt;';&lt;/P&gt;&lt;P&gt;RestNPTaskTriggerTable:&lt;BR /&gt;SQL SELECT&lt;BR /&gt;"__KEY_data"&lt;BR /&gt;FROM JSON (wrap off) "data" PK "__KEY_data"&lt;BR /&gt;WITH CONNECTION( URL "$(vPublshTaskURL)", HTTPHEADER "cookie" "$(vCookie)");&lt;/P&gt;&lt;P&gt;[_post_items]:&lt;BR /&gt;LOAD [__KEY_data] AS [__KEY_data]&lt;BR /&gt;RESIDENT RestNPTaskTriggerTable&lt;BR /&gt;WHERE NOT IsNull([__KEY_data]);&lt;BR /&gt;DROP TABLE RestNPTaskTriggerTable;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Get-Status-and-completed-values-from-NPrinting-Task-using-REST/m-p/1572768#M23669</guid>
      <dc:creator>satishsure</dc:creator>
      <dc:date>2024-11-16T03:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get Status and completed values from NPrinting Task using REST API</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Get-Status-and-completed-values-from-NPrinting-Task-using-REST/m-p/1572992#M23684</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your question is not detailed enough.&lt;/P&gt;&lt;P&gt;Do you want to get a Status and Completed for all your executions or for any particular one? Remember that the same task can have hundreds of executions and you will not know which one is which one.&lt;/P&gt;&lt;P&gt;in this link &lt;A href="https://nprintingadventures.wordpress.com/2019/04/08/nprinting-api-qlik-rest-subroutines/" target="_blank" rel="noopener"&gt;https://nprintingadventures.wordpress.com/2019/04/08/nprinting-api-qlik-rest-subroutines/&lt;/A&gt; you will find script and subroutines which can be used to get a data you want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;in particular you might want to focus on lines: 1417 - 1495 about &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;" GET LAST EXECUTION". &amp;nbsp;N&lt;/SPAN&gt;&lt;SPAN&gt;ote that i use it in conjuction with actual task currently running, so it is a part of another subroutine called: "&lt;/SPAN&gt;&lt;SPAN&gt;SUB&lt;/SPAN&gt;&lt;SPAN&gt; NP_TriggerTasks"&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Important - since in this case it is a mixtrure of POST call and GET call notice how each time i open required caonnection method.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I understand that my script may not suit all your requirements, but with minor adjustments (and this is really down to qlik script logic) you will be able to change it.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Apr 2019 01:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Get-Status-and-completed-values-from-NPrinting-Task-using-REST/m-p/1572992#M23684</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2019-04-25T01:06:09Z</dc:date>
    </item>
  </channel>
</rss>

