PRAXIS/Docs
API

Events API

Everything Praxis knows ends up as an event, and events are just JSON. This endpoint returns them for a feed. There's a live sample below you can run without any setup.

The hosted API is in private beta. The sample-boulevard feed on this page is public and returns real output: the same events the challenge scores you against.

Endpoint#

request
$ curl "$PRAXIS_API/v1/feeds/{feed_id}/events" \
    -H "Authorization: Bearer $PRAXIS_KEY"

Beta accounts get a base URL and key at onboarding; there is no public endpoint yet. The sample below runs against data hosted on this site, so it works without either.

Query parameters#

feed_idstringrequired
The source to read events from. Path parameter.
zonestring
Restrict to events from one zone, e.g. zone_a. Omit for all zones on the feed.
typestring
Event type filter: zone.entry, zone.exit, zone.dwell, or lock.acquired.
sincefloat
Only events with t greater than this value, in seconds from feed start. Useful for polling.
evidenceboolean
Include evidence URLs in each event. Defaults to false to keep payloads small.

Try it#

This runs against the public sample feed, a 15.6 second aerial clip of an LA boulevard with one anchored zone on the road. Fifteen cars enter during the clip.

GET/v1/feeds/sample-boulevard/events

Each element of events is one distinct car entering the zone: its timestamp in seconds, its persistent track ID, and its normalized position at the moment of entry. The deduplication rules from Rules & events have already been applied; entries here are physical cars, not raw detections.

Polling pattern#

For live feeds, poll with since set to the timestamp of the last event you processed:

poll.py
last_t = 0.0
while True:
    r = get(f"/v1/feeds/{feed}/events", params={"since": last_t})
    for ev in r.json()["events"]:
        handle(ev)          # your logic
        last_t = ev["t"]
    sleep(1.0)

Events are immutable once emitted. If you hold an event ID, the event and its evidence will still be there when you come back for them.