Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am using NPrinting API to execute my task but unable to get any end point for getting task execution logs
API Link : https://help.qlik.com/en-US/nprinting/February2021/APIs/NP+API/index.html?page=50
But to Get Logs I didn't get any API and work around.
As an work around I tried to download log itself by task execution ID : let say URL of logs for a specific task execution is
https://qliknprinting.xyz.nett/npe/executions/e0de8e4a-3a8c-5fgt-bfe1-d9b46717eb25/logs/download
Code to download :
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-RestMethod -Uri "https://qliknprinting.xyz.nett/npe/executions/e0de8e4a-3a8c-5fgt-bfe1-d9b46717eb25/logs/download"
But everytime I am getting same SSL Error
Invoke-RestMethod : The request was aborted: Could not create SSL/TLS secure channel.
At E:\np_automation\np_task_execution\test.ps1:28 char:1
so basically I need solution to get logs for Nprinting task execution logs
Hi @satyaban
Please confirm the version of NPrinting that you are using.
The label you used in this discussion is NPrinting 17.0 which is not supported and furthermore does not support NP APIs.
To allow execution of the NP API's you must be on a supported version of NPrinting server.
Kind regards...
@Frank_S yes I mentioned wrong version
Correct Version is
Qlik NPrinting November 2020
Version: 20.39.3.0
Basically I am using NP API to execute tasks etc and its working fine
I am struggling to find task execution logs . I am fine with approach and technology but need some solution
Again to download logs from URL itself throws SSL error as mentioned though I have set Security protocol
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Hi,
If you mean that you want to download the logs you see in the task executions page, there is not an API to do that.
You can use https://help.qlik.com/en-US/nprinting/November2020/APIs/NP+API/index.html?page=49 to get information and monitor the status of a specified execution of a task. During the execution you can run this get many times to be updated.
Starting from February 2021 there are APIs for Audit Events data https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=9
Best Regards,
Ruggero
I know downloading tasks logs from API page not available .
basically I am looking for workaround to get that logs
Basically link to log is : https://nprinting.domain:4993/npe/executions/task_execution_id/logs/download
but here not able to authenticate using invoke-webrequest
Hi,
You are trying to use a not documented, not officially supported method. So you do this at your own risk. If it works today it could also stop working in the future.
I strongly suggest you to use one of the officially supported methods.
You could also add this as a requested new feature https://community.qlik.com/t5/Labels-page/bd-p/Category_Labels?categoryId=qlik-ideas&corenode=boards....
Best Regards,
Ruggero
@Ruggero_Piccoli yes thats true we should not follow unofficial approach .
But task execution logs afters execution of tasks is pre-requisite for end user to check status .
Without logs there is no meaning of doing task execution automations
This is very basic and minimum feature qlk should provide w.r.t NPrinting for large enterprise where automation is mandatory and priority .
Thanks for your suggestion and guidance
@Ruggero_Piccoli one small query I have
as Download Logs button is available and can be downloaded from browser then somewhere in server it should be stored ....can we get that path sothat we can read that content
Hi,
If you run https://help.qlik.com/en-US/nprinting/November2020/APIs/NP+API/index.html?page=49 periodically you can retrieve the task execution status. It is included in the JSON answer.
Best Regards,
Ruggero
@Ruggero_Piccoli
already I am able to track status of task execution for every 1 min interval for max 5 minutes
Issue is incase it Failed to know reason log is mandatory .
Knowing status is not that much helpful without log
To check log again we have to login to server
If the Public NP APIs do not fulfill your requirement,
I suggest inserting an in "Idea" here clearly documenting your requirement.
Kind regards...