Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
webtronix
Contributor III
Contributor III

NPrint API POST error - HTTP protocol error 405 (Method Not Allowed):

Hi folks

I have a very bizarre error here.

I've implemented an API code in Qlik that invokes an NPrint task.

This works perfectly, or has done until last week, where it's failed with the following error below.

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.

We've not done any changes to the App, the API App or even the NPrint related apps.

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.

Has anyone had similar issues and any idea what the cause of this could be?

 

I've attached both working and failed logs and also the API code used.

 

---

RestConnectionStatusTable << RestConnectorMasterTable
Lines fetched: 1
connection_data << RestConnectionStatusTable
Lines fetched: 1
'Polling until Cache Status of the Conn : CCP PNS CON FTTP WSS becomes "Generated"'

Connected
RestNPTasksMasterTable << RestConnectorMasterTable
Lines fetched: 51
task_items << RestNPTasksMasterTable
Lines fetched: 0
'For the ANP App : CCP PNS APP FTTP WSS'

'Now trigerring task : '

'Task ID of : '

'The POST API is : https://servername:61001/api/v1/tasks//executions'
Connected
RestNPTaskTriggerTable << RestConnectorMasterTable
The following error occurred:
HTTP protocol error 405 (Method Not Allowed):

{"message":"The requested resource does not support http method 'POST'."}
The error occurred here:
RestNPTaskTriggerTable:
SQL SELECT "__KEY_data" FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "https://servername:61001/api/v1/tasks//executions", 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;")
Data has not been loaded. Please correct the error and try loading again.

 

---

 

 

 

Labels (1)
  • HTTP

10 Replies
FabioSanchesRibeiro

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.

Updating the environment might resolve this issue.

However, there are no indications of a malfunction in the tool itself. The error is likely a result of the script and environment configuration.

Please review the link below to determine if you might need support from the Professional Services team according to your requirements:

How and when to contact Qlik's Professional Services

Best regards,
Fábio