Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

gpr
Contributor III

How to use Qlik NPrinting APIs inside a Qlik Sense load script

Hi all,

attached you'll find a step by step tutorial explaining how to use Qlik Sense (and also QlikView) load script to interact with the Qlik NPrinting APIs.

The examples include:

  • Logging in into NPrinting
  • Collecting data from NPrinting
  • Reloading metadata for a NPrinting connection
  • Create, update and delete NPrinting users
  • Triggering a NPrinting publish task

This document also shows how to use Qlik Sense Tasks to chain these different events directly from QMC.

This tutorial uses standard Qlik REST Connector.

Please read carefully the requirements before to dig into the actual examples.

Enjoy!

42 Replies
pablolabbe
Valued Contributor II

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

This is great for Qlik Sense. What about QlikView ?

Employee
Employee

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

Just a heads-up, you will also need to allow response headers in the REST login connection settings (page 8/9):

HTH - Daniel.

Employee
Employee

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

Hi Pablo,

From page 2 of the document:

The concepts explained in this document are applicable to call all the available NPrinting APIs;

All the examples shown in this tutorial has been tested in a QlikView script as well.

HTH - Daniel.

b_knuever
Contributor III

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

I noticed the bug was solved with the last update, like you said when helping metrying to figure this out. But this document with all the examples and such is a great help, thanks!

ingoginqo
New Contributor II

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

Gianluca,

this is wonderful ... thank you for the very useful documentation!

tan123qlik
New Contributor III

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

I have tried but cannot get the REST connection to work.

  • I have all the right versions of Nprinting and REST installed.
  • I have turned of the firewall on the NPrinting server
  • When I try the get connection I receive the error below
  • I have tried from my own computer, from a Qlik Sense server and also installed REST+QlikView on the NPrinting server.
  • I looked in the Nprinting logs and the full error message is:
    • Qlik.NPrinting.Repo 18.0.3.0 Qlik.NPrinting.Repo.Service.AuthenticationService 20180226T151015.662+01:00 INFO STRNPRINT  0 0 0 0 0 0 0 0 Windows login failed. No valid Windows identity in the current principal.

Does anyone have a clue what the problem could be?

NP.PNG

b_knuever
Contributor III

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

You can try API calls on the NPrinting server in the webbrowser to see what is happening.

I am assuming your login is correct and you checked all the correct checkboxes. Is the login you are using the account used to connect Sense and NPrinting together? if not can you try this account and see what happens? I have been playing with this a lot also before the bug was fixed and never had any issues with the login request.

Employee
Employee

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

Hi,

The logs say "Windows login failed. No valid Windows identity in the current principal.". Please check that you have configured the domain account field for the Qlik NPrinting user you are using.

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 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.
tan123qlik
New Contributor III

Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script

Thanks for your support. I have done more tests but still get the same result. I also installed Postman at the Nprintng server to test. I get the same result from that. See below for the setup from postman and Nprinting. From what I can see the accounts are correct.

Community Browser