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
| Trainge | Sentinel | Use |
|---|---|---|
| uuid.order_item | id | Re-sending updates the same booking instead of duplicating it. |
| period.course_room | space_uuid | Maps to the camera config’s spaceUuid. |
| startdatetime / enddatetime | start / end | Must be a real booking interval. |
Required data-quality rule
enddatetime > startdatetimeOnly 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.
Start manual, then automate
- Import Trainge JSON into Sentinel Calendar.
- Select a mission per booking; it is preserved when the same booking ID is imported again.
- Confirm the room UUID matches camera configuration.
- 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.