DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Engineering High-Scale Real Estate Listings Systems Using Golang, Part 1
  • ZapBot: Building a Chatbot With OpenAI and Gradio
  • Analysis of the Data Processing Framework of Pandas and Snowpark Pandas API
  • How to Build a Real API Gateway With Spring Cloud Gateway and Eureka

Trending

  • Memory Leak Due To Mutable Keys in Java Collections
  • How Developers Are Driving Supply Chain Innovation With Modern Tech
  • Tracing Stratoshark’s Roots: From Packet Capture to System Call Analysis
  • Scaling Multi-Tenant Go Apps: Choosing the Right Database Partitioning Approach
  1. DZone
  2. Data Engineering
  3. Databases
  4. The NPrinting API for Noobs

The NPrinting API for Noobs

It started with a question: Can we trigger an NPrinting task to publish reports right after data reload is successfully performed by Qlik Sense or QlikView?

By 
Wuzhong Zhu user avatar
Wuzhong Zhu
·
Oct. 23, 17 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
10.7K Views

Join the DZone community and get the full member experience.

Join For Free

NPrinting is important for many users. In the 2017 June release, on-demand reporting is enabled with the NPrinting API. Immediately after the release, the above question was raised to me. I spent a few days trying to prototype a solution but ended up with something that is so simple that anyone can do it in 10 minutes. Frustrating? Yes, because I spent so much time on something that is just a little bit better than “Hello, World!” On the other hand, simple is awesome; simple means even a non-technical user can implement it without problem. Pretty cool.

With that, I’m sharing my experience in case I can help others stuck with a similar problem.

Image title

Long story short, it is implemented with a single HTML file, not even a server is required.

1. Create an HTML file and paste this code into it.

2. Modify the task IDs.

3. Modify the API endpoint URI.

Image title

4. Now open the HTML file via a browser (I used Chrome). You should then be able to see your browser pop-up and close immediately after that.

5. That’s it, you’re done! Now you should see the task running in the NPrinting web console.

Image title

But how can you automate this process, you ask?

1. In Qlik Sense or QlikView, call a batch file to open your HTML file with Chrome:

start chrome “C:\Users\…your directory…..\nprintingApiTest.html”

Image title

Things to Note

1. The Qlik NPrinting API is stated as experimental, which means it may be modified in future. This solution is based on 2017 June released.

Image title

2. How to find the task ID:

Image title

3. HTTPS vs. HTTP:

It took me hours to realize that it is HTTP in the documentation, but my actual server is HTTPS. I hope I am the only stupid one here, but wanted to note it.

4. About the NTLM login:

The user is prohibited from doing anything without a login for NPrinting and NTLM is the only login mechanism supported via the API (for now). So, before you implement anything, you should have a rough understanding of NTLM.

When you open the NPrinting web console/news stand, you will see the following login page. Here you have two options: Windows login or email and password login. The Windows login is the NTLM login.

NTLM takes your Windows credentials to login into another system.

Image title

In the NPrinting user console, there is an entry for the domain account. This is for enabling Windows login. If it doesn’t work, check the direction of the slash as shown below.

Image title

How to get the domain and username in cmd:

Image title

Take note that the domain username pair is tagged to your NPrinting user.

Also, sessions are handled by the browser. If you close your browser, the login state will be lost and you must re-login.

Keeping a session alive is particularly challenging with other technology. There are several NTLM libraries for Python and Node but I didn’t have luck with them. Let me know if you have any questions. And definitely let me know if you get it to work.

Cheers and happy hacking!

API

Published at DZone with permission of Wuzhong Zhu, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Engineering High-Scale Real Estate Listings Systems Using Golang, Part 1
  • ZapBot: Building a Chatbot With OpenAI and Gradio
  • Analysis of the Data Processing Framework of Pandas and Snowpark Pandas API
  • How to Build a Real API Gateway With Spring Cloud Gateway and Eureka

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: