DUET PlatformDocs
API referenceRead APIAlarms

Get an alarm occurrence

available
GET
/platform/v1/alarms/{occurrence_id}

Returns one alarm occurrence with its full lifecycle timeline, oldest event first. Returns 404 if the project has no occurrence with this ID. All IDs are DUET IDs.

Authorization

Bearer
headerAuthorizationBearer <token>

Path Parameters

occurrence_id*string

The occurrence_id of the alarm occurrence to return.

Query Parameters

project_id*string

The ID of the project that the occurrence belongs to.

Response Body

The alarm occurrence with its full timeline.

application/json
  1. response
occurrence_id*string

The stable ID that the source system assigns to the occurrence. Together with event_id, it is the deduplication key for events.

duet_occurrence_ref*string

The DUET reference for the occurrence. Pass it as after to break ties when you resume a replay.

source*string

The source system and site that sent the alarm.

organization_id*string

The ID of the organization that owns the project.

project_id*string

The ID of the project that the alarm belongs to.

site*string

The site that the alarm came from.

rule_name*string

The name of the alarm rule that fired.

rule_version*|

The version of the alarm rule that fired.

kind*string

The type of the rule that fired, for example threshold, stale, bitmask, or enum. Treat it as an open set: new values can appear.

severity*string

The severity set on the alarm rule, passed through unchanged. The current values are critical, high, medium, low, and info. Treat it as an open set.

status*string

The occurrence's place in the operator queue: open, claimed, shelved, or resolved. This set is fixed. Recovery of the source condition is recorded in cleared_at, not in status.

resolution_policy*string

How the occurrence ends. auto ends it when the source condition recovers. manual ends it when an operator resolves it. require_both needs recovery and an operator's resolution. For an auto occurrence, status keeps its last queue value (open or claimed) after recovery, so treat an auto occurrence with cleared_at set as inactive.

resolution*|

The operator's resolution note. Null until the occurrence is resolved.

raised_at*string

When the alarm was raised.

Formatdate-time
source_ts*|

The timestamp of the sample that raised the alarm.

Formatdate-time
updated_at*string

When the occurrence last changed in the source system. If you hold more than one snapshot of an occurrence, keep the one with the latest updated_at.

Formatdate-time
synced_at*string

When DUET last stored the occurrence. updated_since compares against this value.

Formatdate-time
cleared_at*|

When the source condition recovered. Null while the condition is still active. For manual and require_both occurrences, a recovered occurrence stays open until an operator resolves it. For auto occurrences, recovery ends the occurrence.

Formatdate-time
raised_value*number

The value that raised the alarm.

last_value*|

The most recent value of the tag.

peak_value*|

The value furthest past the rule's limit while the condition was active.

peak_at*|

When peak_value occurred.

Formatdate-time
recovered_value*|

The value when the condition recovered. Null until recovery.

source_tag*string

The signal tag that the alarm is on. Always present. While device_id is null, group alarms on source_tag and site.

measure*|

The measure that the tag reports, for example frequency.

rule_description*|

The description configured on the alarm rule.

decoded_labels*array<string>

The names of what fired: one label per bit set for a bitmask rule, the code's label for an enum rule, and for an alarm point the label from its device model's point list (or, when no list names the point, its identifier). Empty when nothing was decoded.

point_key*|

For an alarm point, the source system's identifier for the point, for example Error-3521. It doesn't change when the label is edited, so use it to group or filter alarm points. Null for other alarms.

alarm_class*|

The class of the alarm, for example fire, comms, or pcs. Treat it as an open set. Null when no class is configured.

is_nerc*boolean

Whether the alarm is flagged as relevant to NERC compliance, on the alarm point or the rule.

device_id*|

The ID of the DUET device that the tag maps to. Null until the tag is mapped to a device.

device_name*|

The name of the DUET device. Null until the tag is mapped to a device.

device_type*|

The type of the DUET device. Null until the tag is mapped to a device.

parent_device_id*|

The ID of the DUET device's parent device. Null until the tag is mapped to a device.

params?unknown

The concrete limits of the rule when it fired, for example {"op":">","threshold":45}. The keys depend on kind. This field never holds a raw expression.

events*array<>

The lifecycle events, oldest first. List responses and webhooks hold only the newest 50 events.

events_total*integer

The total number of events on the timeline.

events_truncated*boolean

Whether events holds only the newest events. To read the full timeline, call GET /platform/v1/alarms/{occurrence_id}.

Example Request
curl -X GET 'https://api.enurgen.com/platform/v1/alarms/string?project_id=string'
Example Response
{  "occurrence_id": "string",  "duet_occurrence_ref": "string",  "source": "string",  "organization_id": "string",  "project_id": "string",  "site": "string",  "rule_name": "string",  "rule_version": 0,  "kind": "string",  "severity": "string",  "status": "string",  "resolution_policy": "string",  "resolution": "string",  "raised_at": "2019-08-24T14:15:22Z",  "source_ts": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "synced_at": "2019-08-24T14:15:22Z",  "cleared_at": "2019-08-24T14:15:22Z",  "raised_value": 0,  "last_value": 0,  "peak_value": 0,  "peak_at": "2019-08-24T14:15:22Z",  "recovered_value": 0,  "source_tag": "string",  "measure": "string",  "rule_description": "string",  "decoded_labels": [    "string"  ],  "point_key": "string",  "alarm_class": "string",  "is_nerc": true,  "device_id": "string",  "device_name": "string",  "device_type": "string",  "parent_device_id": "string",  "params": null,  "events": [    {      "event_id": "string",      "occurrence_id": "string",      "duet_occurrence_ref": "string",      "type": "raised",      "kind": "string",      "created_at": "2019-08-24T14:15:22Z",      "synced_at": "2019-08-24T14:15:22Z",      "body": "string",      "user_id": "string",      "user_email": "string",      "external_user_id": "string",      "detail": null    }  ],  "events_total": 0,  "events_truncated": true}