To get the annotations of an alarm, use the GetAnnotations
method. GetAnnotations
takes the GUID of the alarm and returns a collection of AlarmAnnotation
objects.
Library method name | GetAnnotations(alarm.Id) |
---|---|
Description | Get annotations of a single alarm |
Method signature |
IEnumerable<AlarmAnnotation> GetAnnotations(Guid alarmId);
|
Method input parameters |
alarmId : GUID of the alarm object the method targets and retrieves the annotations. |
Return values | A collection of AlarmAnnotation . |
The following .NET C# code is an example of a get annotations call:
IEnumerable<AlarmAnnotation> annotations = client.Alarms.GetAnnotations(alarm.Id);
AlarmAnnotation firstAnnotation = annotations.FirstOrDefault();
Console.WriteLine(firstAnnotation);
/*
{
"AlarmUrl": "https://win-ervotujej94/api/v2/alarms/f0f64d5c-b70e-8754-836c-1ac99182f4e4",
"Text": "Test Annotation 00",
"User": "metasyssysagent",
"CreationTime": "2020-05-27T06:21:31Z",
"Action": "none"
}
*/