Qlik Sense Repository API/Engine API(Enigma.js) example with JWT authentication: duplicate/scramble/export
This article is provided as a sample on how to use the Repository API/Engine API (Enigma.js) with JWT authentication.
Workflow of the sample:
Authenticate with JWT on the first call (Duplicate app) and retrieve session id
Run Engine API call (Loop scramble data for each field in the app)
Reuse the same session in the consequent API calls to scramble and export the app, then write it to disk.
A virtual proxy using JWT authentication with prefix "jwt" and cookie name "X-Qlik-Session-jwt" must be set up, the JWT token must be generated and placed in the variable jwttoken
Node.js must be installed (This example was built and tested in version v10.16.0, there might be slight differences depending on the version)
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.