Usage / API reference
Engine runtime
Measure engine runtime accumulated during valid observed intervals.
/v1/connections/{id}/vehicles/{vehicleId}/engine-hoursAuthentication: Bearer consumer API key with an explicit connection grant.
Preview contract. Availability depends on the deployed release, authorized connection and asset.
How to use this endpoint
- Despite the route name engine-hours, metric.value is seconds. Divide by 3600 for display in hours.
- This is runtime during the requested window. The lifetime counter is engineHours.reading.value.seconds on current readings.
- Requires a window of at most seven days. Apply coverage, reset and source-change rules before comparing assets.
Parameters
| Name | Where | Required | Type and behavior |
|---|---|---|---|
id | path | Yes | string |
vehicleId | path | Yes | string |
startTime | query | Yes | stringRFC3339 with offset. History: inclusive; counters use only samples within the window. No interpolation. |
endTime | query | Yes | stringAfter startTime and no later than now. History: exclusive. Counter summaries permit a boundary sample at endTime. |
Request example
curl "$TELEMATICS_ORIGIN/v1/connections/$CONNECTION_ID/vehicles/$VEHICLE_ID/engine-hours?startTime=2026-10-01T00:00:00Z&endTime=2026-10-01T00:20:00Z" \
--header "Authorization: Bearer $TELEMATICS_CONSUMER_KEY"Response fields
HTTP 200 returns CounterReport. Fields listed as required are guaranteed by this contract; optional fields may be absent.
| Field | Type | Required |
|---|---|---|
vehicleId | string | Yes |
window | Window | Yes |
definition | string | No |
metric | Counter | Yes |
limitations | string[] | No |
Nested field shapes and constraints are defined in the OpenAPI contract. For latest telemetry values, see normalized units and availability.
Response example
Synthetic values; this is a shape example, not a live customer response.
{
"vehicleId": "asset-001",
"window": {
"startTime": "2026-10-01T00:00:00Z",
"endTime": "2026-10-01T00:20:00Z"
},
"definition": "engine_runtime_over_observed_time_v1",
"metric": {
"status": "complete",
"value": 300,
"coverageSeconds": 1200,
"coveragePercent": 100,
"sampleCount": 2,
"excludedIntervals": 0,
"sources": [
"example:engine-counter"
],
"intervals": [
{
"startTime": "2026-10-01T00:00:00Z",
"endTime": "2026-10-01T00:20:00Z",
"amount": 300
}
],
"unit": "seconds"
},
"limitations": [
"Runtime includes idling and PTO; it is not productive work or availability utilization.",
"Only same-source counter pairs within 30 minutes are counted. Resets, source changes and larger gaps are excluded.",
"Unobserved time is unknown. No interpolation or backfill is assumed."
]
}Errors and retries
| HTTP status | Meaning |
|---|---|
400 | Invalid time window, metric or cursor |
401 | Consumer authentication denied |
404 | Resource missing or connection access denied |
413 | Requested utilization has more than 10,000 readings; narrow the window |
503 | Service or database unavailable |
Errors return {"error":"reason_code"}. Honor Retry-After when a 429 includes it. Permission and provider failures never become zero-valued telemetry. Connection health and reading status provide separate signals.
Response schema
{
"type": "object",
"properties": {
"vehicleId": {
"type": "string"
},
"window": {
"$ref": "#/components/schemas/Window"
},
"definition": {
"type": "string"
},
"metric": {
"$ref": "#/components/schemas/Counter"
},
"limitations": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"vehicleId",
"window",
"metric"
]
}