Skip to main content

Call the Police

Local alarms. Aligned with the SDK Alarms / AlarmHistory. One question, one answer.

GET /api/alarms​

Event alerts,JSON array. Response fields are read-only.

GET /api/alarms HTTP/1.1
Host: 127.0.0.1:18840
[
{
"id": "PnS.Io.ModuleTimeout",
"severity": "Error",
"message": "模块超时",
"occurredAt": "2026-09-16T10:20:00.0000000+08:00",
"count": 1,
"source": "Io"
}
]
FieldReading and WritingNote
idRead-onlyUnique incident ID; used when confirming a single incident
severityRead-onlyEnumeration: Info / Warning / Error / Critical
messageRead-onlyAlert Message
occurredAtRead-onlyTime of the most recent occurrence
countRead-onlyNumber of occurrences (≥1) within the deduplication window
sourceRead-onlySource (Module / Layer)

GET /api/alarms/history​

The most recent 500 records, with the same fields.

POST /api/alarms/ack​

The request body id is a writable field, taken from GET /api/alarms's id.

POST /api/alarms/ack HTTP/1.1
Host: 127.0.0.1:18840
Content-Type: application/json

{"id": "PnS.Io.ModuleTimeout"}

Response ok / message / acknowledgedCount (always 1) / timestamp. An ID with no active alarms = HTTP 404.

POST /api/alarms/ack-all​

No request body. Acknowledges all active alarms; the response is as above, with acknowledgedCount being the number of acknowledgements.