Query operational history
Use /v1/event for one record and /v1/event/list for filtered history. Both operations use POST with JSON.
POST
/v1/event/list
List operational events
Requires can_view_events. Send the filters in the JSON body. The response contains success, events and count; non-empty results also include next_cursor.
JSON request body
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number; default 1. |
| page_limit | integer | Results per page; default 25. |
| search | string | Optional search text. |
| cursor_id | integer | 0 starts at the newest records; next_cursor retrieves older records. |
| device_ids | array<integer> | Filter by device identifiers. |
| types / event_types | array<integer> | Numeric event-type and entity-type filters. |
| start_date / end_date | string | Optional date filters. |
Request Example
curl -X POST "https://your-lexoh-server.app.lexoh.com:3000/v1/event/list" \
-H "SessionID: SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"cursor_id":0,"page_limit":25}'
Response Example
Example with no matching events.
{
"success": true,
"events": [],
"count": 0
}Read event fields
- id and device_id are numeric identifiers.
- type, category and subcategory are numeric classifications.
- name, description and date_at describe the recorded event.
- data is a string field; do not assume it is already a parsed JSON object.
POST
/v1/event
Retrieve one event
Send the event id in the JSON body. The same event-viewing permission applies.
Request Example
curl -X POST "https://your-lexoh-server.app.lexoh.com:3000/v1/event" \
-H "SessionID: SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id":123}'
Paginate without confusing old and new records
Results are ordered by descending event id. Use next_cursor as cursor_id to continue into older records with the same filters. To check for newer activity, start again with cursor_id:0 and deduplicate records by id.