Skip to content

FleetMiraApi: operations and administration

Source implementation dated 2026-11-05, version 1.1.0-beta9. This page describes the new implementation. Passing source tests does not replace installed service/upgrade acceptance or sign-in on an Android device.

Components and prerequisites

FleetMiraApi is an independent Windows service using NT SERVICE\FleetMiraApi. It requires a regular Enterprise installation and PostgreSQL. SQLite fallback is prohibited. The API process runs no WorkerRuntime. FleetMiraWorker continues to process central uploads, imports, fleet reads and other background jobs; it no longer opens API listeners in Enterprise. Basic/Pro retain their existing SQLite/desktop composition.

API, worker and PostgreSQL can initially share a server. Distributing them across hosts additionally requires shared, appropriately protected mobile intake storage and the necessary portal/certificate files. Co-location creates no special runtime mode. The API reads the central licence entitlement; the worker retains the licence key and activation/verification loop.

For unattended installations, exit code 10 means a required configuration, permissions or service-start step failed after copying the files. The installation is not operational. Inspect protected setup/service logs and Windows service status, correct the cause and rerun setup. Setup protects intake and log directories for administrators, SYSTEM and the service account. Existing files and subdirectories retain working inheritance rules. Permission errors are not ignored as successful steps.

Setup and migration

  1. Back up the database and configuration using the existing operational procedure before updating. Include the Enterprise installer's api component. The Worker setup type includes the API service, which remains separately selectable.
  2. Run regular versioned schema migration with the maintenance account. New tables use api_service_ and api_oauth_ prefixes. Runtime accounts receive no additional DDL privileges.
  3. Provision the certificate chain and private key on the API host. Only administrators and the service account need private-key access. Devices must trust the issuing CA. Certificate verification is not disabled.
  4. In the Enterprise client, under Administration → Communication and integrations, open API service, API configuration, API credentials and Logs. Current users.manage and settings.manage permissions are required.
  5. Enter the HTTPS public URL, bind address, port and server certificate/key paths. The public hostname must be trusted. Review log limits and permitted Android scopes, save, then Reload the relevant service instance.
  6. Configure DNS and firewall for the explicitly selected HTTPS port. No public firewall rule is created automatically. Forwarded headers cannot replace an actual TLS connection.

Without central configuration, the service adopts existing enabled config/mobile-api.json and config/telematics-api.json once. A certificate, key and explicit hostname are required. Additional existing listeners retain their ports as legacy_listeners. Existing mobile DNS-SD configuration is adopted. Original files and tokens are neither deleted nor overwritten. Central configuration takes precedence after adoption. Without valid configuration the service remains UNCONFIGURED and opens no listener.

During upgrades, setup also stops an API service already bound to its own application directory. Foreign service image paths are rejected. Changes and restarts remain subject to normal operational maintenance. Stop the new API service before rolling back to an older worker, which could otherwise create duplicate listeners. Check database/version compatibility separately before rollback.

Endpoints and credentials

The service composes existing controllers at their existing paths: /api/mobile/v1/, /api/devices, /api/dashboard/devices, /api/telematics/, /api/drivercard/ and, when configured, /traffic-offences/. Accounting export remains an outgoing worker request. The archive service stays independent.

The desktop's local driver API retains its loopback and session-token restrictions. Central driver access instead uses the separate drivercard audience with drivercard.read and drivercard.parse. It requires explicit global access and never claims to enforce unsupported customer restrictions. Mobile, device, telematics and driver tokens are not interchangeable.

In API credentials, choose a user, label, audience, scopes and a validity of 1–365 days. Device credentials require explicit customer assignments or global customer access. Telematics and central driver access require global access. Mobile credentials have no customer restriction. Current user permissions are checked during issuance and each request. The plaintext token appears once and is not stored in the database. Transfer it securely to a technical integration; requests use Authorization: Bearer <token> over HTTPS.

Revocation requires confirmation and remains available after licence expiry. The database stores credential metadata and hashes, never bearer secrets. The list and audit events identify the owner, grants and validity.

DTCO Android browser sign-in

The public client is dtco-android, with the exactly registered redirect de.eh.dtco:/oauth/callback. Save a Fleet Mira server target in Android, then select Sign in to Fleet Mira. An Android Custom Tab displays the server's HTTPS sign-in page. This implementation authenticates existing local Fleet Mira accounts. Existing desktop SSO providers do not thereby become web SSO providers; that requires separate web registrations and a verified server-side broker.

Endpoints are GET/POST /oauth/authorize, POST /oauth/token, POST /oauth/revoke and GET /.well-known/oauth-authorization-server. Only Authorization Code with S256 PKCE and Refresh Token are supported; no password grant or embedded client secret. The browser form is bound to a short-lived secure HttpOnly/SameSite cookie. PKCE requests/forms expire after five minutes; single-use codes expire after 60 seconds.

Access tokens last 15 minutes; the overall app session lasts at most 30 days. Refresh tokens rotate on use; proven reuse of an old refresh token revokes the entire session. The mobile credential ID remains stable across refresh so upload receipts and pending jobs retain ownership. Android Keystore protects tokens and the temporary PKCE proof. Refresh preserves offline account binding; new sign-in explicitly renews it. The app verifies redirect, state and stored target before accepting tokens.

Scopes are limited by client grants and current user permissions. Password changes, account locks, disabled local login, session expiry and revocation block the app session. Individual phones appear as separate mobile credentials and can be revoked independently. Manually provisioned integration tokens remain supported. Additional iOS clients require explicit separate client/redirect registrations; no iOS app is implemented here.

Logs and diagnostics

logs/api/api.jsonl contains structured UTF-8/UTC diagnostics with request ID, endpoint family, HTTP status and processing duration. URL secrets, query strings, payloads, passwords and tokens are never logged. The central host suppresses legacy parser diagnostics containing card/file details. Technical failures contain exception types and stack locations without exception content or local variables.

Defaults: rotate daily and at 50 MiB, retain at most 30 days, total budget 1024 MiB. The budget must accommodate at least two maximum-size files. Debug mode expires automatically after 15 minutes. Log write failures are visible in service diagnostics. Audit events remain separate in the database; log rotation does not delete them.

The logs workspace provides search, severity filtering, optional automatic refresh and export of visible sanitized JSONL rows. A read request returns at most 64 KiB/200 lines. Temporary database log responses expire after five minutes; completed other control requests after seven days. Requests interrupted during process termination become UNKNOWN and are not replayed automatically.

API service displays node heartbeat, listener state, licence/maintenance availability, log availability. Diagnose, pause, resume, debug and reload use short-lived PostgreSQL control requests that recheck current administrator rights. PostgreSQL/restore maintenance blocks business access. Pause leaves token revocation available. GET /health/live publicly confirms process response only. Browser requests to /health open Fleet Mira Health without sign-in, in English and dark Material 3 by default. The overview shows API, worker and database state, worker jobs and resource measurements with source and time. Sanitized logs remain restricted to active local Mira administrators with users.manage and settings.manage. See the illustrated setup guide.

Local recovery

The FLEET Mira API shortcut launches DLTNGDownloadTool.exe --api-console. It can inspect Windows service state and protected local logs without a database/API connection. Start/stop are subject to Windows SCM permissions; run as administrator when needed. Before application authentication, the console uses English.

The installed executable also supports --api-service install|remove|start|stop|query|run|console. run is the SCM entry point; console is the interactive diagnostic host. Do not run both for the same host. Service installation/removal and start/stop require Windows administrator rights. remove deletes the service, not business data, logs or tokens. A database advisory lock prevents competing API hosts on the same machine. Shutdown stops acceptance and waits a bounded time for HTTP work; if the deadline is exceeded the SCM host exits with an error for recovery.

Fleet Mira Health at /health is public, English and dark by default. Worker job summaries and resource measurements are public; logs remain administrator-only. Setup and measurement limits: FleetMiraApi service.