GET /api/log/events/?page=1&pageSize=1&direct=desc
Get a page of log events using stable pagination.
Auth: Bearer.
Query params
Section titled “Query params”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | number | no* | — | Page number, starting at 1. Used only in the first request in a series. Ignored if cursor is provided. |
pageSize | number | yes | — | Number of events per page. Valid range: 1..8. |
direct | string | no | "desc" | Sort direction: "asc" — oldest to newest; "desc" — newest to oldest. |
severityMask | number | no | all (31) | Severity bit mask: bit0=DEBUG, bit1=INFO, bit2=WARNING, bit3=ERROR, bit4=FAULT. |
cursor | number | no* | — | Cursor for continuing the query. See below. |
*Either page or cursor is required.
cursor
Section titled “cursor”The cursor provides stable sequential pagination without duplicates or gaps.
- First request in a series: the client sends
page=1and omitscursor. The server starts the query atlastSequence(desc) oroldestSequence(asc). - Response contains
nextCursor, the position from which to continue. - Subsequent requests: the client sends the
cursorfrom the previous response;pageis ignored. - End of the query:
nextCursor: nullmeans that no more data is available. - New series (when navigating to another UI page): the client resets
cursorand starts again withpage=1.
Response 200
Section titled “Response 200”{ "nextCursor": 249, "eventCount": 1, "events": [ { "sequence": 250, "timestamp": "2026-04-16T12:00:00Z", "errorCode": 0, "pending": true, "severity": "WARNING", "dataType": "GENERIC", "generic": { "message": "Channel 1 open circuit" } } ]}Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
nextCursor | number|null | Cursor for the next request. null if the end of the query has been reached. |
eventCount | number | Number of events in the current result set (0..pageSize). |
events | array | Events in direct order. |
If no more data is available, the response contains eventCount: 0, events: [],
and nextCursor: null. This is not an error.
events[]
Section titled “events[]”| Field | Type | Required | Description |
|---|---|---|---|
sequence | number | yes | Event sequence number |
timestamp | string | yes | ISO 8601 UTC |
errorCode | number | yes | Error code |
pending | boolean | yes | true if the event has not yet been acknowledged in the current power session |
severity | string | yes | "DEBUG", "INFO", "WARNING", "ERROR", "FAULT" |
dataType | string | yes | "GENERIC", "FAULT", "NETWORK" |
generic | object | no | Present if dataType = "GENERIC" |
fault | object | no | Present if dataType = "FAULT" |
network | object | no | Present if dataType = "NETWORK" |
generic
Section titled “generic”| Field | Type | Description |
|---|---|---|
message | string | Event text |
| Field | Type | Description |
|---|---|---|
taskName | string | Task name |
registers | string | A single string in the form PC=... LR=... SP=... CFSR=... HFSR=... MMFAR=... BFAR=... R0=... R1=... R2=... R3=... R12=... xPSR=... |
network
Section titled “network”| Field | Type | Description |
|---|---|---|
message | string | Text |
remoteIp | string | Remote IP address |
remotePort | number | Remote port |
localPort | number | Local port |
lwipError | number | lwIP error code |
Scenario: populate a 25-event UI page (5 requests of 5)
Section titled “Scenario: populate a 25-event UI page (5 requests of 5)”GET /api/log/events/?page=1&pageSize=5&direct=desc&severityMask=31→ { "nextCursor": 245, "eventCount": 5, "events": [...] }
GET /api/log/events/?cursor=245&pageSize=5&direct=desc&severityMask=31→ { "nextCursor": 240, "eventCount": 5, "events": [...] }
GET /api/log/events/?cursor=240&pageSize=5&direct=desc&severityMask=31→ { "nextCursor": 235, "eventCount": 5, "events": [...] }
GET /api/log/events/?cursor=235&pageSize=5&direct=desc&severityMask=31→ { "nextCursor": 230, "eventCount": 5, "events": [...] }
GET /api/log/events/?cursor=230&pageSize=5&direct=desc&severityMask=31→ { "nextCursor": null, "eventCount": 5, "events": [...] }The first request uses page=1; subsequent requests use the cursor from the previous response.
The cursor prevents the server from rescanning records that have already been read,
which is especially important when filtering by severityMask.