Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
fachto76
Contributor II
Contributor II

Nprinting API No Data retrieved

Hi All,

I managed to connect to Nprinting via Postman to test functionality.

However when launching get request in Postman https://<NPR SERVER>:4993/api/v1/apps

I am getting the following results , where I would expect some data coming back

{
    "data": {
        "items": [],
        "totalItems"0,
        "offset"0,
        "limit"50
    }
}
 
Labels (2)
2 Solutions

Accepted Solutions
Frank_S
Support
Support

Have you tried connecting via the Qlik REST connector within the Qlik Sense app? What were the results?

Is what you are seeing preventing you from making an NP API call.

Are you seeing any specific errors associated with the output you shared?

 

Note that we did have something similar reported in the past but that was fixed in Sept. 2019 NPrinting API suite.

See following help page to assist with modifying default limits:

Kind regards...

 

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @fachto76 

First call should be an authentication call with the user who has NPrinting role assigned allowing it to read required entities. That would allow you to obtain a cookie which you can use in subsequent calls. To simplify things you could use service account credentials to run such call. 

So the most important question at this stage is which user have you used and what access does this user have in NPrinting?

If you are authenticated with service account user you should be able to run "get Apps" method to obtain list of all existing apps...

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

5 Replies
Frank_S
Support
Support

Have you tried connecting via the Qlik REST connector within the Qlik Sense app? What were the results?

Is what you are seeing preventing you from making an NP API call.

Are you seeing any specific errors associated with the output you shared?

 

Note that we did have something similar reported in the past but that was fixed in Sept. 2019 NPrinting API suite.

See following help page to assist with modifying default limits:

Kind regards...

 

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @fachto76 

First call should be an authentication call with the user who has NPrinting role assigned allowing it to read required entities. That would allow you to obtain a cookie which you can use in subsequent calls. To simplify things you could use service account credentials to run such call. 

So the most important question at this stage is which user have you used and what access does this user have in NPrinting?

If you are authenticated with service account user you should be able to run "get Apps" method to obtain list of all existing apps...

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
fachto76
Contributor II
Contributor II
Author

Thank you @Frank_S , your first link, showed me the way.

All was set up correctly, just 1 important thing missed out, setting my service account as administrator in NPrinting.

Once done, immediate results

fachto76
Contributor II
Contributor II
Author

Thanks @Lech_Miszkiewicz , yep service account was not setup as administrator.

I also would like to thank you as over the past days when trying to resolve I found a lot of useful information provided by you.

 

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

no problem - I am glad i could help..

If you are intending on using API within Qlik Sense or QlikView script you may leverage my library which already takes care of how the scripts structures need to look like. 

It may be outdated in some areas but you will get general feel on how calls need to be made.

More detail you can find here:

https://nprintingadventures.com/2019/04/08/nprinting-api-qlik-rest-subroutines/

 

cheers

Lech 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.