Skip to main content

History Query API — overview

The History Query API is for asking questions about the past — last week, this month, between these dates. If "live" or "right now" is in your question, you want a different collection.

This guide is an orientation

The History Query API in the Reference has every summary type, every history endpoint, and the exact path/query parameters for each. Browse it for the full surface — this guide only covers the patterns.

What it contains

CategoryUse for
Vehicle History / Unit HistoryRaw point-by-point past data — every GPS fix, every event
Vehicle Summaries / Unit SummariesAggregated views — totals, distances, counts
Vehicle ExpensesHistorical expense rollups

Summaries answer questions like "how far did vehicle X drive in May?" in one call. Raw history is the underlying detail — bigger, slower, but lets you reconstruct anything.

Two ways to specify a time range

Most endpoints accept the range in one of two forms:

  • From/to — explicit from_date + to_date (and often from_time / to_time). Use when you have specific bounds.
  • Period — a named relative window like this-month, last-month, this-quarter, plus a date anchor. Cleaner for "the usual" intervals.

You'll see both in the API Reference; pick whichever fits your UI.

A "summary-type" for almost every metric

Summary endpoints often take a {summary-type} path parameter — e.g. speeding-distances, harsh-driving, fuel-events, idle-time. The same endpoint shape returns different rollups depending on which type you pass. The exact list of valid types is in the endpoint description in the API Reference.

Try it

# Vehicle summary for one vehicle over a named period
curl "https://www.acmdestiny.net/api/v1/history/summary/vehicles/full/by-vehicle/{vehicle_id}/date/2026-05-01/period/this-month" \
-H "Authorization: bearer YOUR_TOKEN"

# Raw history for one vehicle between two dates
curl "https://www.acmdestiny.net/api/v1/history/vehicle/{vehicle_id}/from/2026-05-01/to/2026-05-07" \
-H "Authorization: bearer YOUR_TOKEN"

(Path shapes can vary slightly per endpoint — the API Reference under History Query API is authoritative.)

When to use a different collection

  • Right-now position / live statusGET /vehicles/{id}/telemetry or /monitoring/... in the HTTP API.
  • Live stream as events happenStreaming (SSE).
  • A generated PDF report (debrief, expenditure, position log) → the Reports section of the HTTP API.