I wonder if we could create an alert by calling REST API. I tried to raise an alert by code but did not see it in ‘SEE ALL ALERTS’
I used UiPath.Web.Client.dll of UiPath.PowerShell library (GitHub - UiPath/orchestrator-powershell: UiPath Orchestrator PowerShell cmdlet library) to call Orchestrator REST API in C# Here is the sample code
Api_20_4.Alerts.RaiseProcessAlert(new UiPath.Web.Client20204.Models.RaiseAlertParameters()
{
ProcessAlert = new UiPath.Web.Client20204.Models.ProcessAlertDto()
{
Id = Guid.NewGuid(),
RobotName = "Studio S.Le",
ProcessName = process,
Message = notification,
Severity = UiPath.Web.Client20204.Models.ProcessAlertDtoSeverity.Error
}
});
It ran successfully but I did not see alert shown in menu.
Hi,
did this worked for you ?
im trying to do the same !
BR/Hazem