Litmus Edge 4.4.x - System: Events
Get Events
POST {{edgeUrl}}/events/query
Get Events
Returns a page of historical device events with optional filters by severity, event ID, time window, and free-text. This is the only GraphQL endpoint in System.
Endpoint
POST {{edgeUrl}}/events/query
Content-Type: application/json
Authentication
HTTP Basic Auth. Username is your API token, password is empty. Tokens are managed under System > Access Control > Tokens.
Request body (GraphQL)
query events($filter: HistoryFilter, $offset: Int!, $count: Int!) {
severityList
events(filter: $filter, offset: $offset, count: $count) {
events {
component eventId severity msg
time { utc local }
attrs { name value }
}
total
}
}
Variables
| Field | Type | Required | Description |
|---|---|---|---|
offset / count |
integer | Yes | Paging. The server does not cap count; pick a sane page size (<= 1000) and iterate with offset until you reach total. |
filter.severity |
string | No | "info", "warn", or "alert". |
filter.eventId |
object | No | Inclusion / exclusion list for specific event IDs. |
filter.fromTimestamp |
integer | Yes | Unix epoch milliseconds, must be nonzero. Omitting it fails with filter should contain From timestamp. |
filter.toTimestamp |
integer | No | Unix epoch milliseconds. |
{
"offset": 0,
"count": 10,
"filter": {
"eventId": {},
"fromTimestamp": 1673213725331,
"toTimestamp": 1704749725331
}
}
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
data.severityList |
string[] | Legal severity values (INFO, WARN, ALERT). |
data.events.total |
integer | Total matching events (across all pages). |
data.events.events[] |
object[] | One entry per event. |
events[].component |
string | Originating service. |
events[].eventId |
string | Stable event identifier. |
events[].severity |
string | One of INFO, WARN, ALERT. |
events[].msg |
string | Free-form message. |
events[].time.utc/local |
string | ISO 8601 timestamps. |
events[].attrs |
object[] | Event-specific {name, value} attributes. |
Errors
| HTTP status | When it happens |
|---|---|
400 Bad Request |
Missing or malformed query/body parameter. |
401 Unauthorized |
Missing or invalid credentials. |
403 Forbidden |
Token lacks permission for this operation. |
404 Not Found |
Target entity does not exist. |
5xx |
Service is unreachable, restarting, or internally errored. Inspect device logs under System > Support. |
TLS note: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.
Request Body
GraphQL Query
query events($filter: HistoryFilter, $offset: Int!, $count: Int!) {
severityList
events(filter: $filter, offset: $offset, count: $count) {
events {
component
eventId
severity
msg
time {
utc
local
}
attrs {
name
value
}
}
total
}
}
Variables
{
"offset": 0,
"count": 10,
"filter": {
"eventId": {},
"fromTimestamp": 1673213725331,
"toTimestamp": 1704749725331
}
}
Response
Status: 200 OK
{
"data": {
"severityList": [
"INFO",
"WARN",
"ALERT"
],
"events": {
"events": [],
"total": 0
}
}
}
Purge Events
PUT {{edgeUrl}}/events/mgmt/purge
Purge Events
Deletes the stored event history and returns the number of bytes reclaimed. Pair it with Events Management Stats to see how much the event log is costing before you clear it.
This is destructive and irreversible: purged events are gone, and subsequent Get Events queries return total: 0 for the purged window.
Endpoint
PUT {{edgeUrl}}/events/mgmt/purge
Content-Type: application/json
Authentication
HTTP Basic Auth. Username is your API token, password is empty. Tokens are managed under System > Access Control > Tokens.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
enabled |
boolean | Yes | Set to true to run the purge. |
{ "enabled": true }
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
freed |
integer | Bytes reclaimed from the event log. Matches the size that /events/mgmt/stats reported immediately before the call. |
{ "freed": 12288 }
Errors
| HTTP status | When it happens |
|---|---|
400 Bad Request |
Missing or malformed query/body parameter. |
401 Unauthorized |
Missing or invalid credentials. |
403 Forbidden |
Token lacks permission for this operation. |
404 Not Found |
Target entity does not exist. |
405 Method Not Allowed |
The path only accepts PUT; GET and POST are rejected. |
5xx |
Service is unreachable, restarting, or internally errored. Inspect device logs under System > Support. |
TLS note: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.
Request Body
{
"enabled": true
}
Response
Status: 200 OK
{
"freed": 12288
}
Events Management Stats
GET {{edgeUrl}}/events/mgmt/stats
Events Management Stats
Returns the on-disk size of the event log in bytes.
Endpoint
GET {{edgeUrl}}/events/mgmt/stats
Authentication
HTTP Basic Auth. Username is your API token, password is empty. Tokens are managed under System > Access Control > Tokens.
Response
{ "size": 36864 }
Errors
| HTTP status | When it happens |
|---|---|
400 Bad Request |
Missing or malformed query/body parameter. |
401 Unauthorized |
Missing or invalid credentials. |
403 Forbidden |
Token lacks permission for this operation. |
404 Not Found |
Target entity does not exist. |
5xx |
Service is unreachable, restarting, or internally errored. Inspect device logs under System > Support. |
TLS note: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.
Response
Status: 200 OK
{
"size": 36864
}
Zerotouch Reports
GET {{edgeUrl}}/dm/zerotouch/reports
Zerotouch Reports
Returns the Zerotouch (zero-touch onboarding) reports recorded on the device. Useful for auditing initial provisioning.
Endpoint
GET {{edgeUrl}}/dm/zerotouch/reports
Authentication
HTTP Basic Auth. Username is your API token, password is empty. Tokens are managed under System > Access Control > Tokens.
Response
200 OK -- application/json. Empty array on devices that were not Zerotouch-provisioned.
Errors
| HTTP status | When it happens |
|---|---|
400 Bad Request |
Missing or malformed query/body parameter. |
401 Unauthorized |
Missing or invalid credentials. |
403 Forbidden |
Token lacks permission for this operation. |
404 Not Found |
Target entity does not exist. |
5xx |
Service is unreachable, restarting, or internally errored. Inspect device logs under System > Support. |
TLS note: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.
Get Event Storage State
GET {{edgeUrl}}/events/mgmt/storage
Get Event Storage State
Whether the device stores events. The web UI reads it on the System > Events page and toggles it with PUT /events/mgmt/storage and body {"enabled": <bool>}.
Endpoint
GET {{edgeUrl}}/events/mgmt/storage
Authentication
HTTP Basic Auth. Username is your API token, password is empty. Tokens are managed under System > Access Control > Tokens.
Parameters
None.
Response
200 OK -- application/json.
| Field | Type | Description |
|---|---|---|
enabled |
boolean | true when events are stored. |
{ "enabled": true }
Errors
| HTTP status | When it happens |
|---|---|
400 Bad Request |
Missing or malformed query/body parameter. |
401 Unauthorized |
Missing or invalid credentials. |
403 Forbidden |
Token lacks permission for this operation. |
404 Not Found |
Target entity does not exist. |
5xx |
Service is unreachable, restarting, or internally errored. Inspect device logs under System > Support. |
TLS note: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.
Response
Status: 200 OK
{
"enabled": true
}
Subscribe to Events
GET {{edgeUrl}}/events/subscription
Subscribe to Events
Streams system events (device connect / disconnect, service and security events) as they are logged. The Events page uses it for its live view; Get Events queries the stored history.
Endpoint
GET wss://{{edgeHost}}/events/subscription
Sec-WebSocket-Protocol: graphql-transport-ws
WebSocket. Open wss://{{edgeHost}}/events/subscription with a WebSocket client; a plain HTTP GET does not stream. After importing this item, convert it to a Postman WebSocket request.
This is the GraphQL subscription endpoint of the events service (EventsLive.subscribe). Speak graphql-transport-ws: send connection_init, wait for connection_ack, then send a subscribe message carrying the document below. The legacy graphql-ws protocol (start instead of subscribe) is also accepted.
Authentication
HTTP Basic Auth on the WebSocket upgrade request. Username is your API token, password is empty. A token in the query string is not accepted.
An Origin header is not required by this service.
Subscription
subscription eventsLive($historyCount: Int!) {
subscribe(historyCount: $historyCount) {
component
eventId
severity
msg
time {
utc
local
}
attrs {
name
value
}
}
}
{"historyCount": 50}
| Argument | Type | Required | Description |
|---|---|---|---|
historyCount |
Int! |
Yes | Number of past events to replay first. The UI sends 50. On a 4.0.x test device no past events were replayed within the first seconds; only new events arrived. |
filter |
LiveFilter |
No | { eventId: { component, eventId }, severity }. All fields are optional strings. |
Messages
Each event arrives as a next message whose payload.data.subscribe is an Event. The example response lists the captured text frames, one JSON document per line.
| Field | Type | Description |
|---|---|---|
component |
String! |
Emitting service, for example dh (DeviceHub). |
eventId |
String! |
Event type, for example device.connected. |
severity |
String! |
info, warning, error, ... |
msg |
String! |
Human-readable message. |
time |
Time! |
utc and local timestamps. |
attrs |
[Item!]! |
Event-specific name / value pairs. |
The stream stays open until you send complete or close the socket.
Errors
| Response | When it happens |
|---|---|
401 Unauthorized on the upgrade |
Missing or invalid Authorization header. |
error message, then complete |
The document does not validate, for example Cannot query field "nope" on type "Event". |
TLS note: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.
Response
Status: 200 OK
{"type":"connection_ack"}
{"payload":{"data":{"subscribe":{"component":"dh","eventId":"device.connected","severity":"info","msg":"Device connected.","time":{"utc":"2026-10-14T18:28:25Z","local":"2026-10-14T11:28:25-07:00"},"attrs":[{"name":"driver","value":"Fanuc CNC Ethernet (Gen1.3)"},{"name":"id","value":"F9DF967C-5981-5F38-B195-0A1BDF961E6F"},{"name":"msg","value":"Device connected."},{"name":"name","value":"CS1_VMC02"},{"name":"uuid","value":"7f897d4f-732d-4484-a1ea-3e8077af76ff"}]}}},"id":"1","type":"next"}