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.
sample-boulevard feed on this page is public and returns real output: the same events the challenge scores you against.Endpoint#
$ 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_idstringrequiredzonestringzone_a. Omit for all zones on the feed.typestringzone.entry, zone.exit, zone.dwell, or lock.acquired.sincefloatt greater than this value, in seconds from feed start. Useful for polling.evidencebooleanfalse 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.
/v1/feeds/sample-boulevard/eventsEach 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:
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.