Search events of an event tag

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. id is the event tag _id. fields lists conditions on field values, all of which must match; an empty array matches every event. videoLength is the clip length in SECONDS used for each result; 0 takes the event tag's own video length.
  • cameras: the cameras to search, at least one, each with the edgeId of the Core it is connected to.
  • start and end: the time range of the event timestamp, both inclusive, Unix epoch milliseconds, UTC.
  • page starts at 1 and size is the number of events per page.
  • sort: 1 oldest first, -1 newest 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

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
Responses

400

A 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.

500

Internal server error.

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*