To get a single alarm use the FindById
method, the library delivers an Alarm
object with the details specific to that GUID.
To get the alarms of a specific object or network device, use the GetForObject
and GetForNetworkDevice
methods. Use the GUID of the parent object as the input.
Library method name | FindById |
---|---|
Description | Get a single alarm |
Method signature |
Alarm FindById(Guid alarmId);
|
Method input parameters |
alarmId : GUID of the alarm object the method returns. |
Return values | An Alarm . |
The following .NET C# code is an example of a get single alarm call:
Alarm singleAlarm = client.Alarms.FindById(alarm.Id);
PagedResult<Alarm> objectAlarms = client.Alarms.GetForObject(objectId, alarmFilter);
PagedResult<Alarm> deviceAlarms = client.Alarms.GetForNetworkDevice(device.Id,
alarmFilter);