Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
h_prakash
Creator II
Creator II

Qlik Sense - Nprinting API Help

Hello Qlik Experts,

I was trying trigger Nprinitng Task from QMC through using Qlik Sense API's from the script.

I am getting Error when I trying to get the User infromation by using the bellow Script

RestUserMasterTable:

SQL SELECT

"__KEY_data",

(SELECT

"id",

"email",

"__FK_items"

FROM "items" FK "__FK_items")

FROM JSON (wrap off) "data" PK "__KEY_data"

WITH CONNECTION( URL "https://NprintingServer.com/api/v1/Users?limit=1000000", HTTPHEADER "cookie" "$(vCookie)" );




[users_items]:

LOAD [id] AS [users_userId],

[email] AS [users_userEmail]

RESIDENT RestUserMasterTable

WHERE NOT IsNull([__FK_items]) ;

let vUserId = Peek('users_userId',0,'users_items');

DROP TABLE RestUserMasterTable;



I am getting the Following Error:


The following error occurred:

QVX_UNEXPECTED_END_OF_DATA: HTTP protocol error 500 (Internal Server Error): An unhandled exception occurred; check the log for more information.

The error occurred here:

RestUserMasterTable: SQL SELECT "__KEY_data", (SELECT "id", "email", "__FK_items" FROM "items" FK "__FK_items") FROM JSON (wrap off) "data" PK "__KEY_data" WITH CONNECTION( URL "https://NprintingServer.com/api/v1/Users?limit=1000000", HTTPHEADER "cookie" "NPWEBCONSOLE_SESSION=bd96b56e55272338ced7e494b849cb200ca97240-%00_TS%3Asession%00%00userid%3Afefea970233949d2b10680ab407ccc9d%00%00NPWEBCONSOLE_XSRF-TOKEN%3AIaUb%2FUjNdhecdxIa%2BycFDm5GUk3aW5RPVeysEk0IRaw%3D%00; " )

1 Reply
Ruggero_Piccoli
Support
Support

Hi,

I'm not an expert in this topic but, based on my investigation, it could be a preblem in how the query is write.

Try to change the FROM to "FROM "items" FK "__FK_items" ArrayValueAlias "@Value")".


If this will not work, please open a support ticket and include the logs and all the details on how to reproduce.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.