<?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>article Nprinting API: Send On-demand request with Postman in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Nprinting-API-Send-On-demand-request-with-Postman/ta-p/1716726</link>
    <description>&lt;P&gt;This article explains how to send a request to Nprinting On-Demand API using Postman.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/EM&gt;&lt;BR /&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Prerequisites:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Before proceeding below, check the following article:&amp;nbsp;&lt;I&gt;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/NPrinting-API-Setup-Requirements/ta-p/1715507" target="_blank" rel="noopener"&gt;NPrinting API Setup Requirements&lt;/A&gt;&lt;/I&gt;&lt;/LI&gt;
&lt;LI&gt;Qlik Nprinting Server 17.4 (June 2017) or higher (Qlik Nprinting Engine also needs to be installed. It is not required to install the On-demand QlikView extension)&lt;/LI&gt;
&lt;LI&gt;"Enable On-Demand and API report generation" should be enabled on the report.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Enable on Demand and API report generation.png" style="width: 806px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56052i029E662626A246AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Enable on Demand and API report generation.png" alt="Enable on Demand and API report generation.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;QlikView Desktop&amp;nbsp;Personal Edition&amp;nbsp;is not supported.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&lt;BR /&gt;First of all, install the Postman Chrome extension.&amp;nbsp;See&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/QRS-API-using-Xrfkey-header-in-Postman-Chrome-Extension/ta-p/1714661" target="_blank" rel="noopener"&gt;QRS API using Xrfkey header in Postman&lt;/A&gt;&amp;nbsp;for some basic knowledge about how to getting started with Postman.&lt;/P&gt;
&lt;H3&gt;Authentication&lt;/H3&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;GET&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/login/ntlm" target="test_blank"&gt;https://yourservername:4993/api/v1/login/ntlm&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Request headers:&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;Content-Type&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;application/json&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GET Headers.png" style="width: 946px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56050i3C83BEE923473121/image-size/large?v=v2&amp;amp;px=999" role="button" title="GET Headers.png" alt="GET Headers.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If it returns &lt;FONT face="courier new,courier"&gt;code:0 (Status: 200 OK)&lt;/FONT&gt; then it means that the authentication went well.&lt;BR /&gt;&lt;BR /&gt;If it returns&lt;FONT face="courier new,courier"&gt; code:1 (Status: 401 Unauthorized)&lt;/FONT&gt;, then it may be that the Windows user used does not have sufficient rights.&lt;/P&gt;
&lt;P&gt;Go to the Nprinting Web Console and make sure that the user exists and is enabled:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Administration Enabled.png" style="width: 807px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56051i6093AA387EF10436/image-size/large?v=v2&amp;amp;px=999" role="button" title="Administration Enabled.png" alt="Administration Enabled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;Fetch the report ID to run&lt;/H3&gt;
&lt;P&gt;We now need to fetch the report ID for the report we want to run.&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;GET&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/reports" target="test_blank"&gt;https://yourservername:4993/api/v1/reports&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Response:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fetch ID response.png" style="width: 463px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56054i43C3495365262528/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fetch ID response.png" alt="Fetch ID response.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The report ID in this case is&amp;nbsp;&lt;STRONG&gt;ce4cd669-4040-4b9c-9f20-94541c907f9e.&lt;/STRONG&gt;&lt;/P&gt;
&lt;H3&gt;Send on-demand request&lt;/H3&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;POST&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/ondemand/requests&amp;nbsp;" target="test_blank"&gt;https://yourservername:4993/api/v1/ondemand/requests&amp;nbsp;&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Request headers:&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;Content-Type&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;application/json&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Request Body:&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;{&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"type": "report",&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"config": {&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "reportId": "&lt;STRONG&gt;ce4cd669-4040-4b9c-9f20-94541c907f9e&lt;/STRONG&gt;",&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"outputFormat": "HTML"&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;BR /&gt;}&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;The following response should be returned:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result Body.png" style="width: 941px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56055iA2184A30FD55565D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result Body.png" alt="Result Body.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The request ID is&amp;nbsp;&lt;STRONG&gt;b81a2160-d871-4c09-952c-bd8d28563986&lt;/STRONG&gt; in this case. We can use this ID to check the request status and fetch the request when it is completed.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;if the POST request returns the error&amp;nbsp;"&lt;STRONG&gt;403 Forbidden REVEL_CSRF: tokens mismatch&lt;/STRONG&gt;" &lt;A href="https://community.qlik.com/t5/Knowledge/How-to-Authenticate-Connect-with-the-Qlik-NPrinting-API-in/ta-p/1716540" target="_self"&gt;check this link&lt;/A&gt;&amp;nbsp; and add the&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;X-XSRF-TOKEN&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;with the value of the&lt;STRONG&gt; cookie&lt;/STRONG&gt;&amp;nbsp;in the header&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manage cokies.png" style="width: 510px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72637i00A4E7E08134E70E/image-dimensions/510x257?v=v2" width="510" height="257" role="button" title="manage cokies.png" alt="manage cokies.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;Fetch On-demand request status&lt;/H3&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;GET&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/ondemand/requests/" target="test_blank"&gt;https://yourservername:4993/api/v1/ondemand/requests/&lt;/A&gt;&lt;STRONG&gt;b81a2160-d871-4c09-952c-bd8d28563986&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Response:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "data": {
        "id": "b81a2160-d871-4c09-952c-bd8d28563986",
        "status": "completed",
        "created": "2017-08-06T08:50:26Z",
        "requestType": "Report",
        "reportType": "Html",
        "outputFormat": "HTML",
        "title": "Report1"
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;BR /&gt;Download Report&lt;/H3&gt;
&lt;P&gt;You will need to open this URL in a browser tab in order to download the report as Postman will just show the file as binary.&lt;BR /&gt;&lt;BR /&gt;URL:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="https://yourservername:4993/api/v1/ondemand/requests/" target="test_blank"&gt;https://yourservername:4993/api/v1/ondemand/requests/&lt;/A&gt;&lt;STRONG&gt;b81a2160-d871-4c09-952c-bd8d28563986&lt;/STRONG&gt;/&lt;/FONT&gt;result&lt;BR /&gt;&lt;BR /&gt;A popup will appear and asks if you want to download the file.&lt;BR /&gt;&lt;BR /&gt;Note: If you are not authenticated in the browser you are trying to request this URL from. You will need to log in again using&amp;nbsp;&lt;I&gt;&lt;A href="https://yourservername:4993/api/v1/login/ntlm" target="test_blank"&gt;https://yourservername:4993/api/v1/login/ntlm&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Feb 2022 14:48:50 GMT</pubDate>
    <dc:creator>Damien_V</dc:creator>
    <dc:date>2022-02-18T14:48:50Z</dc:date>
    <item>
      <title>Nprinting API: Send On-demand request with Postman</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Nprinting-API-Send-On-demand-request-with-Postman/ta-p/1716726</link>
      <description>&lt;P&gt;This article explains how to send a request to Nprinting On-Demand API using Postman.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/EM&gt;&lt;BR /&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Prerequisites:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Before proceeding below, check the following article:&amp;nbsp;&lt;I&gt;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/NPrinting-API-Setup-Requirements/ta-p/1715507" target="_blank" rel="noopener"&gt;NPrinting API Setup Requirements&lt;/A&gt;&lt;/I&gt;&lt;/LI&gt;
&lt;LI&gt;Qlik Nprinting Server 17.4 (June 2017) or higher (Qlik Nprinting Engine also needs to be installed. It is not required to install the On-demand QlikView extension)&lt;/LI&gt;
&lt;LI&gt;"Enable On-Demand and API report generation" should be enabled on the report.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Enable on Demand and API report generation.png" style="width: 806px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56052i029E662626A246AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Enable on Demand and API report generation.png" alt="Enable on Demand and API report generation.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;QlikView Desktop&amp;nbsp;Personal Edition&amp;nbsp;is not supported.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="qlik-migrated-tkb-headings"&gt;Resolution:&lt;/H3&gt;
&lt;P&gt;&lt;BR /&gt;First of all, install the Postman Chrome extension.&amp;nbsp;See&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Knowledge-Base/QRS-API-using-Xrfkey-header-in-Postman-Chrome-Extension/ta-p/1714661" target="_blank" rel="noopener"&gt;QRS API using Xrfkey header in Postman&lt;/A&gt;&amp;nbsp;for some basic knowledge about how to getting started with Postman.&lt;/P&gt;
&lt;H3&gt;Authentication&lt;/H3&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;GET&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/login/ntlm" target="test_blank"&gt;https://yourservername:4993/api/v1/login/ntlm&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Request headers:&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;Content-Type&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;application/json&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GET Headers.png" style="width: 946px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56050i3C83BEE923473121/image-size/large?v=v2&amp;amp;px=999" role="button" title="GET Headers.png" alt="GET Headers.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If it returns &lt;FONT face="courier new,courier"&gt;code:0 (Status: 200 OK)&lt;/FONT&gt; then it means that the authentication went well.&lt;BR /&gt;&lt;BR /&gt;If it returns&lt;FONT face="courier new,courier"&gt; code:1 (Status: 401 Unauthorized)&lt;/FONT&gt;, then it may be that the Windows user used does not have sufficient rights.&lt;/P&gt;
&lt;P&gt;Go to the Nprinting Web Console and make sure that the user exists and is enabled:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Administration Enabled.png" style="width: 807px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56051i6093AA387EF10436/image-size/large?v=v2&amp;amp;px=999" role="button" title="Administration Enabled.png" alt="Administration Enabled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;Fetch the report ID to run&lt;/H3&gt;
&lt;P&gt;We now need to fetch the report ID for the report we want to run.&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;GET&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/reports" target="test_blank"&gt;https://yourservername:4993/api/v1/reports&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Response:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fetch ID response.png" style="width: 463px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56054i43C3495365262528/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fetch ID response.png" alt="Fetch ID response.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The report ID in this case is&amp;nbsp;&lt;STRONG&gt;ce4cd669-4040-4b9c-9f20-94541c907f9e.&lt;/STRONG&gt;&lt;/P&gt;
&lt;H3&gt;Send on-demand request&lt;/H3&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;POST&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/ondemand/requests&amp;nbsp;" target="test_blank"&gt;https://yourservername:4993/api/v1/ondemand/requests&amp;nbsp;&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Request headers:&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;Content-Type&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;application/json&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Request Body:&lt;/P&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;{&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"type": "report",&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"config": {&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "reportId": "&lt;STRONG&gt;ce4cd669-4040-4b9c-9f20-94541c907f9e&lt;/STRONG&gt;",&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"outputFormat": "HTML"&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;BR /&gt;}&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;The following response should be returned:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Result Body.png" style="width: 941px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/56055iA2184A30FD55565D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result Body.png" alt="Result Body.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The request ID is&amp;nbsp;&lt;STRONG&gt;b81a2160-d871-4c09-952c-bd8d28563986&lt;/STRONG&gt; in this case. We can use this ID to check the request status and fetch the request when it is completed.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;if the POST request returns the error&amp;nbsp;"&lt;STRONG&gt;403 Forbidden REVEL_CSRF: tokens mismatch&lt;/STRONG&gt;" &lt;A href="https://community.qlik.com/t5/Knowledge/How-to-Authenticate-Connect-with-the-Qlik-NPrinting-API-in/ta-p/1716540" target="_self"&gt;check this link&lt;/A&gt;&amp;nbsp; and add the&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;X-XSRF-TOKEN&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;with the value of the&lt;STRONG&gt; cookie&lt;/STRONG&gt;&amp;nbsp;in the header&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="manage cokies.png" style="width: 510px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/72637i00A4E7E08134E70E/image-dimensions/510x257?v=v2" width="510" height="257" role="button" title="manage cokies.png" alt="manage cokies.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;H3&gt;Fetch On-demand request status&lt;/H3&gt;
&lt;TABLE style="width: 500px;" border="1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;COMMAND&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;STRONG&gt;URL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="1" rowspan="1"&gt;GET&lt;/TD&gt;
&lt;TD colspan="1" rowspan="1"&gt;&lt;A href="https://yourservername:4993/api/v1/ondemand/requests/" target="test_blank"&gt;https://yourservername:4993/api/v1/ondemand/requests/&lt;/A&gt;&lt;STRONG&gt;b81a2160-d871-4c09-952c-bd8d28563986&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;Response:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "data": {
        "id": "b81a2160-d871-4c09-952c-bd8d28563986",
        "status": "completed",
        "created": "2017-08-06T08:50:26Z",
        "requestType": "Report",
        "reportType": "Html",
        "outputFormat": "HTML",
        "title": "Report1"
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;BR /&gt;Download Report&lt;/H3&gt;
&lt;P&gt;You will need to open this URL in a browser tab in order to download the report as Postman will just show the file as binary.&lt;BR /&gt;&lt;BR /&gt;URL:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;A href="https://yourservername:4993/api/v1/ondemand/requests/" target="test_blank"&gt;https://yourservername:4993/api/v1/ondemand/requests/&lt;/A&gt;&lt;STRONG&gt;b81a2160-d871-4c09-952c-bd8d28563986&lt;/STRONG&gt;/&lt;/FONT&gt;result&lt;BR /&gt;&lt;BR /&gt;A popup will appear and asks if you want to download the file.&lt;BR /&gt;&lt;BR /&gt;Note: If you are not authenticated in the browser you are trying to request this URL from. You will need to log in again using&amp;nbsp;&lt;I&gt;&lt;A href="https://yourservername:4993/api/v1/login/ntlm" target="test_blank"&gt;https://yourservername:4993/api/v1/login/ntlm&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 14:48:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Nprinting-API-Send-On-demand-request-with-Postman/ta-p/1716726</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2022-02-18T14:48:50Z</dc:date>
    </item>
  </channel>
</rss>

