Asgard Mobile API (1.0.0-draft)

Download OpenAPI specification:

Draft REST surface for the Asgard fleet-tracking mobile app, Release 1 — Core tracking. Scope covered (from the client's updated phasing):

  1. Secure login and permissions
  2. Vehicle list, search, group visibility and live status
  3. Live fleet map and vehicle location
  4. Vehicle details: speed, ignition, last update, mileage and available sensors
  5. Navigate to a vehicle in Google/Apple Maps
  6. Route history and track replay
  7. Trips, stops, parking and journey details
  8. Basic geofence presence, display, visits and dwell time
  9. Historical trip data access (up to 24 months)

Conventions

  • All timestamps are RFC 3339 UTC (2026-09-29T08:15:00Z).
  • All distances are metres, speeds km/h, durations seconds, headings degrees (0-359).
  • Every list endpoint is paginated with cursor + limit and returns meta.nextCursor.
  • Visibility is enforced server-side: a vehicle/group/geofence the caller cannot see returns 404, not 403.
  • The API is versioned in the path (/api/v1). Breaking changes go to /api/v2.
  • Deep-link URLs for Google/Apple Maps are returned by the server so the app never has to build them.

Auth

Log in with Asgard credentials

Request Body schema: application/json
required
username
required
string
password
required
string <password>
object (DeviceInfo)

Responses

Request samples

Content type
application/json
{
  • "username": "reports",
  • "password": "pa$$word",
  • "device": {
    }
}

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "refreshToken": "string",
  • "tokenType": "Bearer",
  • "expiresIn": 900
}

Exchange a refresh token for a new access token

Request Body schema: application/json
required
refreshToken
required
string

Responses

Request samples

Content type
application/json
{
  • "refreshToken": "string"
}

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "refreshToken": "string",
  • "tokenType": "Bearer",
  • "expiresIn": 900
}

Revoke the current refresh token (and push registration)

Authorizations:
bearerAuth

Responses

Current user, role, permissions and visible groups

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": "u_1042",
  • "username": "reports",
  • "displayName": "Reports User",
  • "email": "reports@example.com",
  • "account": {
    },
  • "role": "fleet_manager",
  • "permissions": [
    ],
  • "visibleGroupIds": [
    ],
  • "timezone": "Europe/London",
  • "units": {
    }
}

Vehicles

Searchable, filterable vehicle list with live status

Returns only vehicles in groups the caller may see. Live status is embedded so the list screen needs a single call. Use /live for map refreshes.

Authorizations:
bearerAuth
query Parameters
q
string

Free-text search (name, registration, driver, VIN)

groupId
Array of strings

Comma-separated group IDs

status
Array of strings (MotionState)
Items Enum: "moving" "stopped" "parked" "offline"
ignition
boolean
sort
string
Default: "name"
Enum: "name" "-name" "lastUpdate" "-lastUpdate" "status"
cursor
string
limit
integer [ 1 .. 500 ]
Default: 50

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Vehicle detail (static + live + sensors + odometer)

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "registration": "string",
  • "vehicleType": {
    },
  • "groups": [
    ],
  • "driver": {
    },
  • "live": {
    },
  • "vin": "string",
  • "make": "string",
  • "model": "string",
  • "imei": "string",
  • "deviceModel": "string",
  • "odometer": {
    },
  • "engineHours": 0,
  • "currentTrip": {
    },
  • "sensors": [
    ],
  • "navigation": {}
}

Latest position, telemetry and sensor snapshot for one vehicle

Lightweight endpoint the detail screen polls every few seconds.

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string

Responses

Response samples

Content type
application/json
{
  • "state": "moving",
  • "ignition": true,
  • "speed": 0,
  • "heading": 0,
  • "position": {
    },
  • "address": "string",
  • "geofences": [
    ],
  • "lastUpdate": "2019-08-24T14:15:22Z",
  • "stale": true,
  • "vehicleId": "string",
  • "odometer": 0,
  • "fuelLevel": 0,
  • "batteryVoltage": 0,
  • "gsmSignal": 0,
  • "satellites": 0,
  • "sensors": [
    ]
}

Available sensors and their latest values

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Live

Bulk live positions for the fleet map

Returns the latest position of every visible vehicle (optionally filtered). Pass since (the serverTime of the previous response) to get only vehicles that have moved/updated since then — the app merges the delta into its marker set. For fleets of thousands of units the app should pass bbox and zoom so the server can return clustered markers instead of raw points.

Authorizations:
bearerAuth
query Parameters
groupId
Array of strings
status
Array of strings (MotionState)
Items Enum: "moving" "stopped" "parked" "offline"
bbox
string
Example: bbox=-2.5,53.3,-2.0,53.6

minLon,minLat,maxLon,maxLat

zoom
integer [ 0 .. 22 ]
since
string <date-time>
cluster
boolean
Default: false

Responses

Response samples

Content type
application/json
{
  • "serverTime": "2026-09-29T08:15:00Z",
  • "vehicles": [
    ],
  • "clusters": [ ],
  • "removed": [ ]
}

Server-Sent Events stream of live position updates (optional, phase 1b)

text/event-stream. Each event is one LiveVehicle object. Filters mirror /live. Falls back to polling /live?since= when the connection drops.

Authorizations:
bearerAuth
query Parameters
groupId
Array of strings

Responses

History

Route history (positions) for track replay

Ordered positions between from and to (max 7 days per call; page with cursor). simplify applies Douglas-Peucker with the given tolerance in metres so the map draws a clean polyline; omit for full-fidelity replay. Data available for 24 months.

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string
query Parameters
from
required
string <date-time>
to
required
string <date-time>
simplify
number
Default: 0

Tolerance in metres (0 = none)

format
string
Default: "json"
Enum: "json" "geojson" "polyline"
cursor
string
limit
integer <= 20000
Default: 5000

Responses

Response samples

Content type
application/json
{
  • "vehicleId": "string",
  • "from": "2019-08-24T14:15:22Z",
  • "to": "2019-08-24T14:15:22Z",
  • "pointCount": 0,
  • "distance": 0,
  • "bbox": "string",
  • "points": [
    ],
  • "meta": {
    }
}

Chronological journey timeline (trips + stops + geofence visits merged)

One call for the "History" screen's day view.

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string
query Parameters
from
required
string <date-time>
to
required
string <date-time>

Responses

Response samples

Content type
application/json
{
  • "summary": {
    },
  • "items": [
    ]
}

Trips

Trips for a vehicle in a period

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string
query Parameters
from
required
string <date-time>
to
required
string <date-time>
minDistance
integer
Default: 0

Drop trips shorter than this many metres

cursor
string
limit
integer [ 1 .. 500 ]
Default: 50

Responses

Response samples

Content type
application/json
{
  • "summary": {
    },
  • "data": [
    ],
  • "meta": {
    }
}

Stops and parking events for a vehicle in a period

type=stop is ignition-on stationary (idling); type=parking is ignition-off. Both include duration and the geofence the vehicle was in, if any.

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string
query Parameters
from
required
string <date-time>
to
required
string <date-time>
type
string
Default: "all"
Enum: "stop" "parking" "all"
minDuration
integer
Default: 0

Seconds

cursor
string
limit
integer [ 1 .. 500 ]
Default: 50

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Journey detail for one trip, including its track

Authorizations:
bearerAuth
path Parameters
tripId
required
string
query Parameters
includeTrack
boolean
Default: true

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "vehicleId": "string",
  • "driver": {
    },
  • "start": {
    },
  • "end": {
    },
  • "durationSeconds": 0,
  • "distance": 0,
  • "maxSpeed": 0,
  • "avgSpeed": 0,
  • "idleSeconds": 0,
  • "inProgress": true,
  • "track": [
    ],
  • "stops": [
    ],
  • "geofenceVisits": [
    ],
  • "fuelUsed": 0
}

Geofences

Geofences visible to the caller (for map overlay)

Authorizations:
bearerAuth
query Parameters
q
string

Free-text search (name, registration, driver, VIN)

bbox
string
includeGeometry
boolean
Default: true
cursor
string
limit
integer [ 1 .. 500 ]
Default: 50

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Geofence detail with geometry and vehicles currently inside

Authorizations:
bearerAuth
path Parameters
geofenceId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "colour": "#FF8800",
  • "shape": "polygon",
  • "geometry": {
    },
  • "radius": 0,
  • "centre": {
    },
  • "groupIds": [
    ],
  • "vehiclesInside": [
    ]
}

Visits to a geofence (entry, exit, dwell) by any visible vehicle

Authorizations:
bearerAuth
path Parameters
geofenceId
required
string
query Parameters
from
required
string <date-time>
to
required
string <date-time>
vehicleId
string
cursor
string
limit
integer [ 1 .. 500 ]
Default: 50

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Geofences the vehicle is currently inside (presence)

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string

Responses

Response samples

Content type
application/json
{
  • "asOf": "2019-08-24T14:15:22Z",
  • "data": [
    ]
}

Geofence visits for a vehicle over a period (dwell report)

Authorizations:
bearerAuth
path Parameters
vehicleId
required
string
query Parameters
from
required
string <date-time>
to
required
string <date-time>
geofenceId
string
cursor
string
limit
integer [ 1 .. 500 ]
Default: 50

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Groups

Groups the caller can see (for filtering the vehicle list / map)

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

System

Liveness / readiness (includes ingest lag)

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "ingestLagSeconds": 0,
  • "version": "string"
}

Client bootstrap config (feature flags, min app version, poll intervals)

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "minAppVersion": {
    },
  • "features": {
    },
  • "livePollIntervalSeconds": 10,
  • "staleAfterSeconds": 600,
  • "historyRetentionMonths": 24
}