Alarm History Operations
| Read Operations | Description |
|---|---|
|
Returns alarm history records for the specified points based on the parameters for date range and maximum history records. |
GetAlarmHistory
Given a point tag and optional maximum value count and time range specifiers, this operation returns the alarm state transition history for the specified point. If the number of matching values exceeds the maximum specified, the response XML will include a special element with continuation information. To continue the operation, the same request must then be repeated, with the additional inclusion of the continuation element from the last request. The return XML will indicate success or failure.
Usage
The following table lists and describes all of the child elements of the request node (<GetAlarmHistoryReq>).
| Element Name | Required | Description |
|---|---|---|
|
Tag |
Yes |
The point tag for which to retrieve alarm history. |
|
HistoryParameters |
No |
A set of parameters which specify the maximum number of entries to return, the time range for alarms to retrieve, and, if applicable, the time of the next entry to retrieve (if the request is a continuation from a previous request). |
|
AttrsToExport |
Yes |
Indicates which alarm attributes to include in the response. |
Examples
Request
The following example represents the first request in a series of continuations.
<?xml version="1.0"?>
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
<GetAlarmHistoryReq>
<Tag>CYGDEMO.SVCMON.00001740</Tag>
<HistoryParameters>
<EarliestTime>2023-10-06T00:00:00Z</EarliestTime>
<LatestTime>2023-10-07T00:00:00Z</LatestTime>
<MaxEntries>4</MaxEntries>
</HistoryParameters>
<AttrsToExport>
<EventCategory/>
<PointValue/>
<AlarmCondition/>
</AttrsToExport>
</GetAlarmHistoryReq>
</CygNetEnterpriseOperations>
Response
The following example represents a successful response, including a continuation element (<NextEntry>).
<?xml version="1.0" encoding="UTF-8"?>
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
<GetAlarmHistoryResp>
<AlarmHistoryEntry>
<EventCategory>SET</EventCategory>
<AlarmCondition>Analog High Alarm</AlarmCondition>
<PointValue>27.0289149252776</PointValue>
<PointTimestamp>2023-10-06T01:46:34.102</PointTimestamp>
</AlarmHistoryEntry>
<AlarmHistoryEntry>
<EventCategory>RESET</EventCategory>
<AlarmCondition>Analog High Alarm</AlarmCondition>
<PointValue>2.65476451170645</PointValue>
<PointTimestamp>2023-10-06T01:46:44.102</PointTimestamp>
</AlarmHistoryEntry>
<AlarmHistoryEntry>
<EventCategory>ACK</EventCategory>
<AlarmCondition>Analog High Alarm</AlarmCondition>
<PointValue>2.65476451170645</PointValue>
<PointTimestamp>2023-10-06T01:46:44.102</PointTimestamp>
</AlarmHistoryEntry>
<AlarmHistoryEntry>
<EventCategory>CLEAR</EventCategory>
<AlarmCondition>Analog High Alarm</AlarmCondition>
<PointValue>2.65476451170645</PointValue>
<PointTimestamp>2023-10-06T01:46:44.102</PointTimestamp>
</AlarmHistoryEntry>
<NextEntry>
<Time>2023-10-06T09:56:18.627Z</Time>
</NextEntry>
<OperationResults success="true" resp_timestamp="2023-10-06T18:35:52.468Z" exec_duration="PT4.853S"></OperationResults>
</GetAlarmHistoryResp>
</CygNetEnterpriseOperations>
Request
The following example represents the next request in a series of continuations, based on the <NextEntry> element from the above response.
<?xml version="1.0"?>
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
<GetAlarmHistoryReq>
<Tag>CYGDEMO.SVCMON.00001740</Tag>
<HistoryParameters>
<EarliestTime>2023-10-06T00:00:00Z</EarliestTime>
<LatestTime>2023-10-07T00:00:00Z</LatestTime>
<MaxEntries>4</MaxEntries>
<NextEntry>
<Time>2023-10-06T09:56:18.627Z</Time>
</NextEntry>
</HistoryParameters>
<AttrsToExport>
<EventCategory/>
<PointValue/>
<AlarmCondition/>
</AttrsToExport>
</GetAlarmHistoryReq>
</CygNetEnterpriseOperations>
Response
The following example represents a successful response, continuing from the time specified in the <NextEntry> element in the above request.
<?xml version="1.0" encoding="UTF-8"?>
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
<GetAlarmHistoryResp>
<AlarmHistoryEntry>
<EventCategory>RESET</EventCategory>
<AlarmCondition></AlarmCondition>
<PointValue>0.31122398366699</PointValue>
<PointTimestamp>2023-10-06T09:56:18.627Z</PointTimestamp>
</AlarmHistoryEntry>
<OperationResults success="true" resp_timestamp="2023-10-06T18:36:57.031Z" exec_duration="PT0.614S"></OperationResults>
</GetAlarmHistoryResp>
</CygNetEnterpriseOperations>
The following example represents an unsuccessful response.
<?xml version="1.0" encoding="UTF-8"?>
<CygNetEnterpriseOperations xmlns="https://CygNetSCADA.com/Schemas/CygNetEnterpriseObjectsnnn">
<GetAlarmHistoryResp>
<OperationResults success="false" resp_timestamp="2023-07-30T22:13:26.155Z" exec_duration="PT0.0035">
<OperationResult type="ERROR" code="50003">Security check failed for ACS application ENTOPS and event ACCESS0</OperationResult>
<OperationResult type="ERROR" code="50208">You are not permitted to execute this operation</OperationResult>
</OperationResults>
</GetAlarmHistoryResp>
</CygNetEnterpriseOperations>


