<?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: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed): in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496306#M5205</link>
    <description>&lt;P&gt;Thanks for replying. This is where I'm at a loss as the main API code (previously attached) is something that was given to me, possibly from this forum and if I run the API code in a fresh app, it will work, but somehow it fails in an existing, previously working app.&lt;/P&gt;
&lt;P&gt;I have a feeling that there is something else underlying in the Qlik repository (cache maybe) that is causing this to fail randomly.&lt;/P&gt;
&lt;P&gt;The thing is that once it fails, it will never work and I have to re-build, (copy paste) the whole code into a new app and then if I run it, it will work, (how !?!)&lt;/P&gt;
&lt;P&gt;Maybe I need to get the Qlik Engineers onto this&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2024 16:11:35 GMT</pubDate>
    <dc:creator>webtronix</dc:creator>
    <dc:date>2024-12-05T16:11:35Z</dc:date>
    <item>
      <title>NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496258#M5201</link>
      <description>&lt;P&gt;Hi folks&lt;/P&gt;
&lt;P&gt;I have a very bizarre error here.&lt;/P&gt;
&lt;P&gt;I've implemented an API code in Qlik that invokes an NPrint task.&lt;/P&gt;
&lt;P&gt;This works perfectly, or has done until last week, where it's failed with the following error below.&lt;/P&gt;
&lt;P&gt;The bizarre bit is that I have several of these Apps with the API built in to run and invoke the NPrint task, and some of them work whilst others that did work perfectly have stopped.&lt;/P&gt;
&lt;P&gt;We've not done any changes to the App, the API App or even the NPrint related apps.&lt;/P&gt;
&lt;P&gt;This happened a few months back and we simply re-built everything from scratch and it worked, identical code between both working and failed. The only difference would have been the Qlik sense ID attached to the API app running this.&lt;/P&gt;
&lt;P&gt;Has anyone had similar issues and any idea what the cause of this could be?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've attached both working and failed logs and also the API code used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;RestConnectionStatusTable &amp;lt;&amp;lt; RestConnectorMasterTable&lt;BR /&gt;Lines fetched: 1&lt;BR /&gt;connection_data &amp;lt;&amp;lt; RestConnectionStatusTable&lt;BR /&gt;Lines fetched: 1&lt;BR /&gt;'Polling until Cache Status of the Conn : CCP PNS CON FTTP WSS becomes "Generated"'&lt;/P&gt;
&lt;P&gt;Connected&lt;BR /&gt;RestNPTasksMasterTable &amp;lt;&amp;lt; RestConnectorMasterTable&lt;BR /&gt;Lines fetched: 51&lt;BR /&gt;task_items &amp;lt;&amp;lt; RestNPTasksMasterTable&lt;BR /&gt;Lines fetched: 0&lt;BR /&gt;'For the ANP App : CCP PNS APP FTTP WSS'&lt;/P&gt;
&lt;P&gt;'Now trigerring task : '&lt;/P&gt;
&lt;P&gt;'Task ID of : '&lt;/P&gt;
&lt;P&gt;'The POST API is : &lt;A href="https://np.orqlik.nat.bt.com:61001/api/v1/tasks//executions" target="_blank" rel="noopener"&gt;https://servername:61001/api/v1/tasks//executions&lt;/A&gt;'&lt;BR /&gt;Connected&lt;BR /&gt;RestNPTaskTriggerTable &amp;lt;&amp;lt; RestConnectorMasterTable&lt;BR /&gt;The following error occurred:&lt;BR /&gt;HTTP protocol error 405 (Method Not Allowed):&lt;/P&gt;
&lt;P&gt;{"message":"The requested resource does not support http method 'POST'."}&lt;BR /&gt;The error occurred here:&lt;BR /&gt;RestNPTaskTriggerTable: &lt;BR /&gt;SQL SELECT "__KEY_data" FROM JSON (wrap off) "data" PK "__KEY_data" &lt;BR /&gt;WITH CONNECTION( URL "&lt;A href="https://np.orqlik.nat.bt.com:61001/api/v1/tasks//executions" target="_blank" rel="noopener"&gt;https://servername:61001/api/v1/tasks//executions&lt;/A&gt;", HTTPHEADER "cookie" "NPWEBCONSOLE_SESSION=18dfed88429f148f8e9466f365d7a46ec0e55b25-%00userlogin%3A2024-12-02T12%3A39%3A43.3729796Z%00%00NPWEBCONSOLE_XSRF-TOKEN%3AOlhc2Wz9S%2FEomVLgjD2D06k1Y4A%2BRiAyiN9VFAMmjV0%3D%00%00_TS%3Asession%00%00userid%3Afce33700c7314de68ed79486071525ec%00;")&lt;BR /&gt;Data has not been loaded. Please correct the error and try loading again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 14:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496258#M5201</guid>
      <dc:creator>webtronix</dc:creator>
      <dc:date>2024-12-05T14:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496268#M5203</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/44687"&gt;@webtronix&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I'm not entirely sure, as I couldn't identify each iteration of the loop.&lt;/P&gt;
&lt;P&gt;However, it seems that in this part of the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-plaintext"&gt;'Task ID of : '

'The POST API is : https://servername:61001/api/v1/tasks//executions'
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Task ID was not populated in the iteration that caused the error.&lt;/P&gt;
&lt;P&gt;It’s possible that the loop is executing one extra step, which might be triggering an error during execution.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 14:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496268#M5203</guid>
      <dc:creator>FabioSanchesRibeiro</dc:creator>
      <dc:date>2024-12-05T14:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496306#M5205</link>
      <description>&lt;P&gt;Thanks for replying. This is where I'm at a loss as the main API code (previously attached) is something that was given to me, possibly from this forum and if I run the API code in a fresh app, it will work, but somehow it fails in an existing, previously working app.&lt;/P&gt;
&lt;P&gt;I have a feeling that there is something else underlying in the Qlik repository (cache maybe) that is causing this to fail randomly.&lt;/P&gt;
&lt;P&gt;The thing is that once it fails, it will never work and I have to re-build, (copy paste) the whole code into a new app and then if I run it, it will work, (how !?!)&lt;/P&gt;
&lt;P&gt;Maybe I need to get the Qlik Engineers onto this&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 16:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496306#M5205</guid>
      <dc:creator>webtronix</dc:creator>
      <dc:date>2024-12-05T16:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496320#M5207</link>
      <description>&lt;P&gt;It's necessary to understand which data is being collected in each application. Something might have happened over the application's lifecycle, such as a failure or some other issue, which could be generating an event that the script, as it is, cannot interpret and handle properly.&lt;/P&gt;
&lt;P&gt;I would suggest identifying the app where the script doesn't run and analyzing the data being generated or not generated that causes this failure. From there, you can adjust the script to either fix or bypass this anomalous condition.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 17:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496320#M5207</guid>
      <dc:creator>FabioSanchesRibeiro</dc:creator>
      <dc:date>2024-12-05T17:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496323#M5208</link>
      <description>&lt;P&gt;But this is where it becomes interesting as the same code copied into another app will work.&lt;/P&gt;
&lt;P&gt;This is the lineage&lt;/P&gt;
&lt;P&gt;Source data imported from an Oracle environment into a QVD&lt;/P&gt;
&lt;P&gt;There is a main app that has the tables and visuals from what the N Print app is built on, via N Print App, Connections, Tasks etc, which work and send out the e-mails, which is fine.&lt;/P&gt;
&lt;P&gt;Then I have a separate app, which simply has the API code. This API code simply invokes and 'handshakes' to the N Print server.&lt;/P&gt;
&lt;P&gt;The issue here is that I get this 'protocol error 405' and then this API app is rendered useless.&lt;/P&gt;
&lt;P&gt;Now if I duplicate the app from the published stream, copy all the sections into a band new app and then load the data, it works!&lt;/P&gt;
&lt;P&gt;So there doesn't seem to be anything wrong with the code or the N Print app or connections.&lt;/P&gt;
&lt;P&gt;If I go back to the 'faulty' app with the API, it fails (which has the same entire code!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm hoping my spiel makes sense &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;(.ps. thanks for engaging here )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--- code below bespoke for each N Print App&lt;/P&gt;
&lt;P&gt;// Save the NP App Name and supply the same app name that you have created&lt;BR /&gt;let vAppName = 'CCP PNS APP FTTP Weekly Summary';&lt;/P&gt;
&lt;P&gt;// Prepolulate this with the number connections the NP App has&lt;BR /&gt;let vNoOfConns = 1;&lt;/P&gt;
&lt;P&gt;// Prepolulate this with the number tasks the NP App has&lt;BR /&gt;let vNoOfTasks = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//rest of the API code below (very long - see attached file )&lt;/P&gt;
&lt;P&gt;//end&lt;/P&gt;
&lt;P&gt;---- code above&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 17:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496323#M5208</guid>
      <dc:creator>webtronix</dc:creator>
      <dc:date>2024-12-05T17:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496324#M5209</link>
      <description>&lt;P&gt;The 405 error is occurring because you are calling the NPrinting API using the POST method on the &lt;STRONG&gt;execution&lt;/STRONG&gt; endpoint.&lt;/P&gt;
&lt;P&gt;This endpoint requires you to provide the &lt;STRONG&gt;APP ID&lt;/STRONG&gt;, and that is not happening in the last iteration of the loop.&lt;/P&gt;
&lt;P&gt;This issue is not related to the NPrinting app or the Qlik Sense app where you are sourcing the data from.&lt;/P&gt;
&lt;P&gt;You are invoking the NPrinting API and passing parameters to it. At this stage, other elements can be ruled out.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 18:14:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496324#M5209</guid>
      <dc:creator>FabioSanchesRibeiro</dc:creator>
      <dc:date>2024-12-05T18:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496488#M5212</link>
      <description>&lt;P&gt;But then why is this working on another app with the same API code ?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 10:07:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496488#M5212</guid>
      <dc:creator>webtronix</dc:creator>
      <dc:date>2024-12-06T10:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496522#M5213</link>
      <description>&lt;P&gt;That's why I mentioned earlier the importance of understanding the data being collected during the script execution.&lt;/P&gt;
&lt;P&gt;This script is gathering all the connections and tasks related to each app you provide.&lt;/P&gt;
&lt;P&gt;Each app has its own chain of connections and tasks, and based on the information we have so far, for certain apps, the final loop (considering "final" as the part where the script fails) does not pass the necessary parameter for the final call. This causes the script to lack the parameter required for the API call being made.&lt;/P&gt;
&lt;P&gt;In the last step of the script, it generates a table with all the tasks of the app. It’s crucial to analyze this table to understand why the script is attempting to make a POST call without passing the &lt;STRONG&gt;Task ID&lt;/STRONG&gt;!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 11:46:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496522#M5213</guid>
      <dc:creator>FabioSanchesRibeiro</dc:creator>
      <dc:date>2024-12-06T11:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496587#M5214</link>
      <description>&lt;P&gt;Thanks for the details,&lt;/P&gt;
&lt;P&gt;So this has been my RCA so far, but not been able to resolve, but managed a workaround.&lt;/P&gt;
&lt;P&gt;I have many API apps built. All of them worked, but some have started to fail as mentioned earlier and that's without any changes to the Qlik App / API app or anything related to NPrint.&lt;/P&gt;
&lt;P&gt;Previously, duplicating the app worked, but even this now fails.&lt;/P&gt;
&lt;P&gt;In My NPrint, I labelled each stage as 'APP' for App / 'CON' for Connection / 'TSK for Task, so in NPrint, Under Task Executions, I could see what the API was doing and at what stage this was being polled at, at least from a GUI perspective.&lt;/P&gt;
&lt;P&gt;The App works as can be seen in the load progress window.&amp;nbsp; As it polls, I can see it's trying to generate the cache via the 'CONN' connection as this can be seen in the 'Task Executions' in NPrint.&lt;/P&gt;
&lt;P&gt;When it failed, the 'TSK' could not be seen.&lt;/P&gt;
&lt;P&gt;Now for the workaround.&lt;/P&gt;
&lt;P&gt;I created a new task, duplicating the original one and then disabling the original one and then re-run the API&lt;/P&gt;
&lt;P&gt;It worked !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the question here is, why has it failed in a working environment. All I did was duplicated the task, like-for-like and it worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Strangely though, If I trigger the original task via NPrint, it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So is something happening back end of Qlik repositories that is corrupting a connection via API somewhere?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 16:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496587#M5214</guid>
      <dc:creator>webtronix</dc:creator>
      <dc:date>2024-12-06T16:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496664#M5215</link>
      <description>&lt;P&gt;Just wanted to add that after I disabled the task that was linked within NPrint and then recreated a new task with the same name, as per usual, I have a schedule that runs daily, this kicked off the API this morning and I received the NPrint notification.&lt;/P&gt;
&lt;P&gt;So the cause is primarily something to do with the NPrint task, even though it does not cause an issue when manually invoked in NPrint, it does when invoked by Qlik Sense via the API call, but only to a particular task.&lt;/P&gt;
&lt;P&gt;I have another API which has worked flawlessly without any issues.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2024 11:00:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496664#M5215</guid>
      <dc:creator>webtronix</dc:creator>
      <dc:date>2024-12-07T11:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: NPrint API POST error -  HTTP protocol error 405 (Method Not Allowed):</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496851#M5219</link>
      <description>&lt;P&gt;This analysis of the API call results requires a consultant to investigate why the execution of a specific task generates data that prevents the API from being triggered sequentially.&lt;/P&gt;
&lt;P&gt;Updating the environment might resolve this issue.&lt;/P&gt;
&lt;P&gt;However, there are no indications of a malfunction in the tool itself. The error is likely a result of the script and environment configuration.&lt;/P&gt;
&lt;P&gt;Please review the link below to determine if you might need support from the Professional Services team according to your requirements:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/How-and-when-to-contact-Qlik-s-Professional-Services-and/ta-p/1714936" target="_blank"&gt;How and when to contact Qlik's Professional Services&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Fábio&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 12:23:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/NPrint-API-POST-error-HTTP-protocol-error-405-Method-Not-Allowed/m-p/2496851#M5219</guid>
      <dc:creator>FabioSanchesRibeiro</dc:creator>
      <dc:date>2024-12-09T12:23:24Z</dc:date>
    </item>
  </channel>
</rss>

