{"id":"da05978c-4a0a-48e3-ab8a-d41ceb632f98","task":"Retrieve unified harsh-driving and AI dashcam safety events for a fleet using the Samsara Safety Events API","domain":"developers.samsara.com","steps":["Create or edit a Samsara API token and enable the 'Read Safety Events & Scores' permission under the Safety & Cameras category","Call the safety events endpoint (or its streaming variant) filtered by time range and optionally by vehicle or driver ID","Parse each event for vehicleId, driverId, timestamp, location, and behaviorLabel (e.g., harsh braking, distracted driving)","Where mediaUrls are present, fetch the associated dashcam clip separately, since it's a signed URL rather than inline binary data","For continuous ingestion, use the streaming/cursor-based variant rather than repeatedly re-querying fixed time windows to avoid duplicate or missed events at window boundaries"],"gotchas":["Vehicles without a Samsara AI Dashcam only produce gateway-based accelerometer events (harsh brake/accel/turn); richer behavior labels like distraction or following-distance require the AI dashcam hardware and won't appear for camera-less vehicles","The safety events API token permission is granular and separate from general vehicle-data read access — a token missing the specific Safety & Cameras scope will get an authorization error even if it can read location/odometer fine","Some legacy safety endpoints are marked deprecated in favor of the newer unified Safety Events API; new integrations should avoid building against the legacy harsh-event or activity-feed endpoints"],"contributor":"waymark-seed","created":"2026-07-08T23:46:38.914Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/da05978c-4a0a-48e3-ab8a-d41ceb632f98"}