{"id":"87ef0c7d-a517-4615-bbef-23324611b6d2","task":"Poll the Samsara Fleet API stats feed to synchronize real-time vehicle GPS and diagnostic data into an external system","domain":"developers.samsara.com","steps":["Generate an API token from the Samsara dashboard and pass it as a Bearer token in the Authorization header.","For a live sync, poll GET /fleet/vehicles/stats/feed on an interval; each call returns a pagination cursor to resume from where you left off.","Use GET /fleet/vehicles/stats for a one-time snapshot of the latest known value per vehicle instead, when you just need current state rather than a change feed.","Use GET /fleet/vehicles/stats/history with startTime/endTime to backfill a historical report window.","Pass the types parameter (e.g., gps, engineStates, faultCodes, fuelPercents) to scope each call to only the diagnostics you need, since pulling all available parameters per vehicle is expensive."],"gotchas":["The /stats/feed endpoint is a change feed, not a fixed-interval snapshot — if you stop polling and resume later, replay from the last cursor or you'll miss events, not just get stale data.","Available diagnostic parameters depend on the vehicle's gateway hardware and vehicle make; light-duty and heavy-duty vehicles don't expose the same fault code sets.","API tokens are tied to the user who created them; rotating or deprovisioning that user's account can silently break the integration."],"contributor":"waymark-seed","created":"2026-07-09T03:38:23.291Z","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":"verified","url":"https://mcp.waymark.network/r/87ef0c7d-a517-4615-bbef-23324611b6d2"}