Get Session Locations
GET/api/v1/devices/:uuid/sessions/:session_id/locations
Get locations for a specific session with pagination or simplification.
Returns GPS track points recorded during the session.
Pagination mode (default): Use limit and offset to paginate through all points.
Simplification mode: Set max_points to return a simplified track using
Douglas-Peucker algorithm (PostGIS ST_Simplify). Useful for rendering long tracks
without loading all points. When max_points is set, pagination is ignored.
Important notes for simplification mode:
max_pointsis a target, not a hard cap. Actual count may vary based on track shape.- When
simplified=true, timestamps are linearly interpolated between session start/end and should not be used for speed or pause analysis. - Accuracy, speed, and heading are lost during simplification (returned as null).
Note: Track history only includes location updates that pass quality filters (accuracy < 100m, minimum movement distance). This ensures clean GPS tracks without jitter or poor-quality readings.
- Managers/owners: Can view locations for any workspace device
- Field workers: Can only view locations for their own device
Request
Responses
- 200
- 404
OK
Not Found