REST API Overview
Authenticate, query positions, manage devices, and build integrations using the Open VTS API.
Last updated March 15, 2026
Open VTS exposes a comprehensive REST API for programmatic access to all platform features. Use it to build custom dashboards, mobile apps, or integrate with third-party systems.
Authentication
The API uses session-based authentication. Obtain a session cookie by sending credentials to the session endpoint:
terminal
curl -X POST 'http://your-server:8082/api/session' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'email=admin&password=admin' \
-c cookies.txtCore Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/devices | List all devices |
| POST | /api/devices | Create a new device |
| GET | /api/positions | Get latest positions |
| GET | /api/positions?deviceId={id}&from={iso}&to={iso} | Get position history |
| GET | /api/geofences | List all geofences |
| POST | /api/geofences | Create a geofence |
| GET | /api/reports/route?deviceId={id}&from={iso}&to={iso} | Generate route report |
| GET | /api/server | Get server information |
Example: Get Device Positions
terminal
# Fetch latest positions for all devices
curl -s 'http://your-server:8082/api/positions' \
-b cookies.txt | jq .
# Response (abbreviated)
[
{
"id": 1234,
"deviceId": 1,
"latitude": 28.6139,
"longitude": 77.2090,
"speed": 45.2,
"course": 180,
"fixTime": "2026-03-15T10:30:00.000+0000"
}
]Webhooks
Open VTS can forward events (position updates, alerts, status changes) to an external URL via HTTP POST. Configure webhooks in Settings → Server → Forward.
Info
For full endpoint documentation including request/response schemas, visit the API Reference.