Messages, Events and Alarms

Sending SECS messages and reading history.

Send a message

bash
POST /api/v1/messages/send
Content-Type: application/json

{
  "equipment_id": "<id>",
  "stream": 1,
  "function": 3,
  "wait_reply": true,
  "body": {"type": "L", "value": [{"type": "U4", "value": 1}]}
}

The response is {"success": true, "transaction_id": ..., "reply": {"stream": 1, "function": 4, "body": {...}}}. Item format: see SECS-II.

Message history

bash
GET /api/v1/messages/history?equipment_id={id}&stream=6&limit=100

Newest first. total stops counting at 10,000; total_capped says when there are more.

Events

bash
GET /api/v1/events?equipment_id={id}&ceid=100&limit=100

Events, alarms and messages in the history carry spooled: true when the tool held them during an outage and sent them when asked (spooling).

Alarms

bash
GET /api/v1/alarms?equipment_id={id}&state=active    # all, active, cleared, acknowledged
GET /api/v1/alarms/active
POST /api/v1/alarms/{id}/acknowledge

{"operator": "j.rao", "comment": "Chamber vented"}

Something missing or wrong on this page? Tell us.