Returns, one page at a time, the events of one event tag posted on the given cameras within a time range, optionally filtered by field values.
Input.
customEvents: one item, the event tag to search; only the first item is used.idis the event tag_id.fieldslists conditions on field values, all of which must match; an empty array matches every event.videoLengthis the clip length in SECONDS used for each result;0takes the event tag's own video length.cameras: the cameras to search, at least one, each with theedgeIdof the Core it is connected to.startandend: the time range of the eventtimestamp, both inclusive, Unix epoch milliseconds, UTC.pagestarts at 1 andsizeis the number of events per page.sort:1oldest first,-1newest first; omitted, newest first.
A field condition is { "name", "type", "operator", "value" }. type is the field's type in the event tag (0 text, 1 true/false, 2 number, 3 decimal). operator for text: 0 equals, 1 not equals, 2 contains, 3 does not contain, 4 starts with; for number and decimal: 0 equals, 1 not equals, 2 less than, 3 greater than, 4 less than or equal, 5 greater than or equal; true/false always tests equality with value.
Response. One result per event. Item i of results, cameraIds, edgeIds, searchEvents and searchObjects describes one event: results[i] is the [start, end] of its clip (event time to event time + video length), searchEvents[i] is [[start, end]] with both times rounded to 2 seconds, and searchObjects[i] is [{ "fields": … }], the values posted with the event. Times are Unix epoch milliseconds. Results are ordered by event time, newest first unless sort is 1. more is true when the page is full, so a next page may exist. latestTs is one millisecond before the earliest event of the page when newest first, and one millisecond after the end of the last clip when oldest first. No match answers { "more": false, "results": [] }.
Required scope: read:custom-event-instances
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400A required value is missing, customEvents or cameras is empty, page, size, start or end is not an integer, or a number or decimal condition has a non-numeric value.
500Internal server error.
