Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
NPrinting has a library of APIs that can be used to customize many native NPrinting functions outside the NPrinting Web Console.
An example of two of the more common capabilities available via NPrinting APIs are as follows
These and many other public NPrinting APIs can be found here: Qlik NPrinting API
In the Qlik Sense data load editor of your Qlik Sense app, two REST connections are required (These two REST Connectors must also be configured in the QlikView Desktop application>load where the API's are used. See Nprinting Rest API Connection through QlikView desktop)
Requirements of REST user account:
Creating REST "GET" connections
Note: Replace QlikServer3.domain.local with the name and port of your NPrinting Server
NOTE: replace domain\administrator with the domain and user name of your NPrinting service user account
Creating REST "POST" connections
Note: Replace QlikServer3.domain.local with the name and port of your NPrinting Server
NOTE: replace domain\administrator with the domain and user name of your NPrinting service user account
Ensure to enter the 'Name' Origin and 'Value' of the Qlik Sense (or QlikView) server address in your POST REST connection only.
Replace https://qlikserver1.domain.local with your Qlik sense (or QlikView) server address.
Ensure that the 'Origin' Qlik Sense or QlikView server is added as a 'Trusted Origin' on the NPrinting Server computer
NOTE: The information in this article is provided as-is and to be used at own discretion. NPrinting API usage requires developer expertise and usage therein is significant customization outside the turnkey NPrinting Web Console functionality. Depending on tool(s) used, customization(s), and/or other factors ongoing, support on the solution below may not be provided by Qlik Support.
Hi @Frank_S -
Appreciate the details in the page.
Even after following all the steps for creating a REST connection for Nprinting.
We are getting an error (401 unauthorized)
we tried multiple accounts, which are admin, on QlikSense as well as Nprinting, still the same issue.
Could you please share some insight / advise.
Thanks,
Swapneel
Please post here for issues you are encountering regarding your NPrinting configuration.
Qlik NPrinting | Qlik Community
Hello,
I am having almost the exact same issue (the error message is slightly different). The GET connector works fine with the same NTLM creds, but impossible to create a POST connector.
I get this error: HTTP protocol error 401 (Unauthorized): Requested resource requires authentication.
The user is RootAdmin on Qlik sense and Administror + User - On demand on NPrinting.
Any ideas?
Thanks in advance!
Sorry for the additional info:
NPrinting:
Qlik NPrinting May 2023 SR2
Version: 23.20.5.0
Qlik Sense:
August 2023 Patch 1
Hi @Frank_S ,
I have created this GET and POST in my Qlik Sense script to trigger NPrinting task. Works well so far but at some point later on, it would failed to receive task_name. So i removed the filter task_name = 'app A' and queried entire NPrinitng available task and found out the task is missing in the query using GET Connector. Looking into my NPrinting tasks, the task is still valid there. Had to re-create for it to appear in my Qlik Sense script query. Any known reason why this is happening or is this a bug?
Best Regards,
Nelson
Hi @NelsonOng ,
This is most likely a pagination issue, not a bug. The NPrinting API GET /tasks endpoint returns paginated results with a default page size. If your NPrinting environment has more tasks than the default limit, your GET connector query only retrieves the first page.
When you re-create the task, it gets a new creation timestamp and lands on the first page of results — which is why it "reappears."
Make sure your REST connector handles pagination. Add the limit and offset query parameters to retrieve all tasks:
GET /api/v1/tasks?limit=100&offset=0
Or loop through pages until you've fetched all results. You can check the totalItems field in the response to know when to stop.
Alternatively, if you know the task ID, query it directly with GET /api/v1/tasks/{taskId} — this bypasses pagination entirely and is more reliable for triggering a specific task.
Best Regards,
Ruggero
Hi @Ruggero_Piccoli ,
Thanks for the suggestion, could be one of the possible issues. But the issue would still suddenly reoccur later on even though i re-created the task and there are no other specific tasks created in NPrinting side. My default value in the "Pagination" section in my connector is currently "None". I'll set it to offset and do some changes on my end.
Best Regards,
Nelson
Hi @NelsonOng ,
At this point, I think we have too little information to understand the exact root cause from this article comment thread.
For now, I would not immediately assume this is a product bug or open a support ticket, because it still looks more like a possible API usage or REST Connector configuration or script logic issue. But we need more details to avoid guessing.
Could you please open a dedicated post in the Qlik NPrinting Community and include the full technical details of what you are doing?
The most useful information would be:
The exact NPrinting API endpoint you are calling, including all query string parameters.
For example:
GET /api/v1/tasks?limit=50&offset=0&sort=-created
The REST Connector pagination settings, preferably with screenshots
A screenshot or sanitized copy of the Qlik Sense load script used to retrieve the tasks.
The raw API response structure, or at least a sanitized sample showing:
data.totalItems
data.limit
data.offset
data.items[]
Whether the missing task is a publish task or an import task.
Whether you are filtering by:
task name
task id
app id
task type
any other field in the Qlik Sense script
Whether the same task can be retrieved directly by id:
GET /api/v1/tasks/{taskId}
Whether the NPrinting UI and the REST API call are using the same environment/server.
Which user/account is used by the REST Connector, and whether that same user can see the task in the NPrinting UI.
If possible, screenshots showing:
The task visible in the NPrinting UI
The REST Connector configuration
The Qlik Sense script result where the task is missing
The API response or resulting table from Qlik Sense
Once we have those details in a dedicated thread, it should be much easier to determine whether this is pagination, filtering, permissions, task type, app association, environment mismatch, script logic, or a real server-side inconsistency.
Best Regards,
Ruggero
Hi @Ruggero_Piccoli ,
This is my existing community post as below that includes my QS script:
Best Regards,
Nelson