Sentinel API v1

From your first API call to production

Trainge integration

Trainge bookings → Sentinel camera missions

Turn Trainge venue bookings into Sentinel calendar events. During a booking, cameras mapped to the room automatically switch mission, then return to their normal mission.

Trainge field mapping

TraingeSentinelUse
uuid.order_itemidRe-sending updates the same booking instead of duplicating it.
period.course_roomspace_uuidMaps to the camera config’s spaceUuid.
startdatetime / enddatetimestart / endMust be a real booking interval.

Required data-quality rule

enddatetime > startdatetime

Only a real interval can determine when to switch and restore a mission. If Trainge exports buyRoom or saleRoom with equal start and end values, it is a template or test record; Trainge must resolve the actual occurrence before sending it.

How to push

POST /api/enterprise/calendar/events
X-Sentinel-Timestamp: <unix seconds>
X-Sentinel-Signature: sha256=<HMAC-SHA256(secret, timestamp + "." + raw_body)>

Send Trainge’s raw { result: { datas: [...] } } response directly; new integrations should send schema: sentinel.booking.v1 with events.

Private bookings, 1-to-1 sessions, groups, and room rentals use the same path. Booking type is display data; add preset_id or prompt when the booking should automatically pick a mission.

Start manual, then automate

  1. Import Trainge JSON into Sentinel Calendar.
  2. Select a mission per booking; it is preserved when the same booking ID is imported again.
  3. Confirm the room UUID matches camera configuration.
  4. When validated, switch Trainge to the signed production API.

Sentinel alerts Trainge in real time

Set Trainge’s receiving endpoint as Sentinel’s Alert Webhook. Critical events are pushed by default; add webhook to suspicious in Alert Policy to receive suspicious events as well. The payload includes camera_id, space_uuid, analysis, and an inline JPEG snapshot by default.

Trainge must verify X-Sentinel-Signature against the raw request body before parsing JSON. Map the incident using space_uuid, then present it for operator review.