Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to send out alerts to external REST API's through HTTP GET or POST requests. Is this possible?
Hi,
This is not currently possible but is on the roadmap as a possible capability that is introduced in a later release.
Thanks,
Sunil
Hi,
This is not currently possible but is on the roadmap as a possible capability that is introduced in a later release.
Thanks,
Sunil
If you can discern the alert in the load script (and in most cases you can) then you can make a call via the REST connector in the load script to send the alert.
Similar is true if you wish to upload a file or send an email on an event occurring in the data.
Say you want to alert if you have a one or more rows where margin is below 50% in the past day you can do this with a RESIDENT load after loading the data table;
tmpMarginAlert:
LOAD
sum(1) as UnderMargin
RESIDENT DataTable
WHERE Date >= DayStart(today()-1) and Margin < 0.5
;
let iUnderMargin = peek('UnderMargin', -1, 'tmpMarginAlert');
DROP TABLE tmpMarginAlert;
if iUnderMargin > 0 then
...
The syntax of the REST PUT call that you need to make then depends very much on the endpoint that you wish to call and what parameters it is expecting.
I did a blog post on sending data from the Qlik load script which you may find helpful;
https://www.quickintelligence.co.uk/send-data-from-qlik-load-script/
This describes sending HTML in the body of an email when a condition is met, sending via a REST connection should be simpler that what is described there.
Hope that helps.
Steve
Thanks @stevedark , I'm aware or the load script option to send out alerts during script exexcution. I was hoping to find this functionality in Qlik Altering, but apparently this will be added in a future release.