跳至主要内容

List alert events

GET 

/api/v1/orgs/{orgId}/alert-events

Retrieve a paginated list of alert events (fired alerts) for an organization. An alert event is created when an alert policy's trigger condition is met and its delay passes without a reading that meets the reset condition. It is resolved automatically when the reset condition is met and the delay passes without a reading that meets the trigger condition. All filters are optional and combined with logical AND.

Parameters

  • status (integer, optional): Filter by event status. Status values are numbers. 0 Firing (currently active, not yet resolved), 1 Acknowledged, 2 Resolved (closed automatically once the reset condition holds). Manual acknowledgement is not available, so 1 does not occur in this version.
  • alertPolicyId (UUID, optional): Filter by the alert policy that fired the event.
  • deviceId (string, optional): Filter by the device the triggering data stream belongs to.
  • start (datetime, optional): Return events fired on or after this timestamp (ISO 8601 UTC).
  • end (datetime, optional): Return events fired before this timestamp (ISO 8601 UTC).
  • sorting (string, optional, default: FiredTime DESC): Sort expression, e.g. firedTime asc.
  • skipCount (integer, optional, default: 0): Number of records to skip.
  • maxResultCount (integer, optional, default: 10): Maximum records to return.

Responses

  • 200 OK: Returns a paginated list of alert events. Each item includes alertEventId, alertPolicyId, policyName (a point-in-time snapshot of the policy name at fire time, unaffected by later renames), deviceId, dataStreamId, status, triggeredValue (the last data stream value received when the delay ended, which may not meet alertLevel), alertLevel (the trigger condition at fire time), firedTime, and, once applicable, resolvedTime and resolvedBy. Events are resolved automatically, so resolvedBy is null. acknowledgedTime and acknowledgedBy are also null in this version. status is a number (0 Firing, 2 Resolved).

Request​

Responses​

OK