Events

Apps running on your EOT-1 report structured events (a detection, a count, a reading) with POST /v1/events on the device; see Apps. Each event has an app-chosen type and a free-form JSON payload, and is linked to the recording that covers it via recording_id / offset_s.

On the cloud platform, GET /api/v1/events reads events from every camera in the organisation that owns your API key. For a single camera, use GET /api/v1/cameras/:id/events instead.

Listing events

curl -H "x-api-key: $EOT_API_KEY" \
  "https://platform.eyeofthetiger.ai/api/v1/events?type=acme.*&from=2026-11-12T18:00:00Z&to=2026-11-13T02:00:00Z&limit=100"
ParameterMeaning
typeAn exact type (acme.headcount), or a namespace prefix ending in .* (acme.* matches acme.headcount and acme.serve, not acmex.thing).
camera_idOnly these cameras. Repeat it for several, up to 30: camera_id=a&camera_id=b. Omit for all.
from, toISO 8601 bounds on started_at: from inclusive, to exclusive.
limitPage size, 1 to 200 (default 50).
cursorThe next_cursor from the previous page.

Events come back newest first:

{
  "events": [
    {
      "event_id": "2026-11-12/21-05-00-a1b2c3d4",
      "camera_id": "eot-a3f9c2d1",
      "type": "acme.headcount",
      "started_at": "2026-11-12T21:05:00.000Z",
      "ended_at": "2026-11-12T21:05:00.000Z",
      "payload": { "count": 14 },
      "recording_id": "2026-11-12/21-00-00",
      "offset_s": 300
    }
  ],
  "next_cursor": "eot-a3f9c2d1__2026-11-12__21-05-00-a1b2c3d4"
}

Keep passing next_cursor back as cursor until it is null. Treat it as opaque. Paging is exact even when many cameras report at the same instant: nothing is skipped or repeated.

Aggregates

Add bucket and agg to get one row per time bucket, camera and type instead of raw events. from and to are required.

ParameterMeaning
bucket<n>m, <n>h or <n>d (up to 31d). Buckets are aligned to UTC: 1h starts on the hour, 1d at UTC midnight.
aggcount (events per bucket), or max / avg of a numeric payload field.
fieldPayload field for max / avg; dotted for nesting, e.g. people.total. Events where it is missing or not a number are left out of the value but still counted in events.
curl -H "x-api-key: $EOT_API_KEY" \
  "https://platform.eyeofthetiger.ai/api/v1/events?type=acme.headcount&from=2026-11-12T00:00:00Z&to=2026-11-13T00:00:00Z&bucket=1h&agg=max&field=count"
{
  "buckets": [
    {
      "bucket_start": "2026-11-12T21:00:00.000Z",
      "camera_id": "eot-a3f9c2d1",
      "type": "acme.headcount",
      "value": 14,
      "events": 12
    }
  ]
}

Buckets come back oldest first, and only buckets with at least one event are listed. value is null when no event in the bucket had a numeric field. One request aggregates at most 10,000 events; past that you get a 400 asking you to narrow the window, type or cameras.

From an AI assistant

The hosted MCP server has the same query as the query_events tool, with camera_ids as a list. See MCP.