Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apr 19, 2022 7:31:52 AM
Mar 18, 2021 11:49:21 AM
This document describes some examples of Qlik NPrinting APIs used to manage users using POSTMAN.
NOTE: Before proceeding below, ensure that the user which is used for authentication (in the following) should have the NPrinting 'Administrator' security role assigned to it.
To login:
We can retrieve the list of all available users by using a get /users call https://help.qlik.com/en-US/nprinting/November2020/APIs/NP+API/index.html?page=56:
We want to use APIs to delete the user with id 2511d333-0e3b-4a05-a1fa-5918cbef5e19. The user ID is visible in JSON retrived before and, if you open its profile in a web browser, in the related URL that appears like https://YourServer:4993/#/admin/users/2511d333-0e3b-4a05-a1fa-5918cbef5e19
The delete /users/{id} is described in https://help.qlik.com/en-US/nprinting/November2020/APIs/NP+API/index.html?page=57
Before proceeding we need to retrieve the connection X-XSRF-TOKEN from the get ntml/login call. Open it and click on Cookies on the right side.
Click on the NPWEBCONSOLE_XSRF-TOKEN tab. Select the token string from the first character after the equal sign to the semicolon and copy it. We will use that token code in the DELETE API.
To run the DELETE API:
If you refresh the web browser tab where you opened the user profile you will get an error because it is no more available.
It is a great start to learn the API. One thing to add to the above is that the user which we use for authentication needs to have a NPrinting role which will allow him to use API (Admin role will do 🙂 )
@Lech_Miszkiewicz Thanks for the suggestion! I'm not able to edit the article, but the user must have a role with the On-Demand -> Create privilege flagged on the Roles administration page for the correct Qlik NPrinting Apps.
Note added...thanks @Lech_Miszkiewicz