Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
SaiPranathiG
Contributor II
Contributor II

qlik Nprinitng API's inside qliksense load editor

Hi

i am trying to reload Nprinting tasks from QMC using the document mentioned here:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-to-use-Qlik-NPrinting-APIs-inside-a-Qli...

But getting the below error at NP Create or Update User Section:

set vUserBody =
'{"Username":"UserA","Email":"usera@qlik.com","Password":"123","Enabled":"true","Folder":"","Subfolder":"","DomainAccount":"","Ti
mezone":"Europe/Berlin","Locale":"en"}';
let vUserBody = replace(vUserBody,'"', chr(34)&chr(34));
set vPostUserULR = 'https:// nprintingserver.domain.com:4993/api/v1/users';
RestNPPOSTandPUTTestTable:
SQL SELECT
"__KEY_data"
FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "$(vPostUserULR)", BODY "$(vUserBody)",
HTTPHEADER "Origin" "https://qliksenseserver.domain.com",
HTTPHEADER "Content-Type" "application/json",
HTTPHEADER "cookie" "$(vCookie)");
[post_and_put_items]:
LOAD [__KEY_data] AS [__KEY_data]
RESIDENT RestNPPOSTandPUTTestTable
WHERE NOT IsNull([__KEY_data]);

SaiPranathiG_0-1644495198784.png

Anyone faced this error and how to resolve?

 

TIA

Labels (2)
1 Solution

Accepted Solutions
Andrea_Spinetti
Former Employee
Former Employee

Hello @SaiPranathiG, if I got your request right this article Troubleshooting Common NPrinting API Errors may help you 😊

If the issue is solved please mark the answer with Accept as Solution.

View solution in original post

1 Reply
Andrea_Spinetti
Former Employee
Former Employee

Hello @SaiPranathiG, if I got your request right this article Troubleshooting Common NPrinting API Errors may help you 😊

If the issue is solved please mark the answer with Accept as Solution.