Get single alarm - Metasys - LIT-12013522 - Software Application - Basic Services client library for .NET (and COM) - Metasys API - 4.2

Metasys REST Client for .NET and COM Developer Guide

Brand
Metasys
Product name
Basic Services client library for .NET (and COM)
Metasys API
Document type
API Reference Guide
Document number
LIT-12013522
Version
4.2
Revision date
2021-04-07
Language
English (United States)

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.

Table 1. Get single alarm .NET signature
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);