Appearance
Device App Uptime
GET /api/v1/device-apps/:deviceId/:appCode/uptime
Returns an uptime summary for a specific application running on a specific device, over a configurable time window.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceId | integer | Yes | The device ID |
appCode | string | Yes | The application code (e.g. "aam", "coatro") |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
from | ISO 8601 datetime | No | Start of today (midnight, server local time) | Start of the time window |
to | ISO 8601 datetime | No | Current time | End of the time window |
Response 200
json
{
"status": true,
"message": "Success",
"data": {
"app": { "code": "viana-core" },
"device": { "id": 101, "name": "Store Entrance Camera" },
"network": { "id": 1, "name": "Retail Network A" },
"site": { "id": 5, "name": "CBD Store" },
"location": { "id": 12, "name": "Entrance" },
"window": {
"from": "2026-03-30T00:00:00.000Z",
"to": "2026-03-30T06:30:00.000Z",
"window_seconds": 23400
},
"summary": {
"running_seconds": 21600,
"stopped_seconds": 1800,
"uptime_pct": 92.31,
"interval_count": 3
},
"current_status": {
"status": "running",
"since": "2026-03-30T05:00:00.000Z",
"hb_last_seen_at": "2026-03-30T06:29:50.000Z",
"source": "heartbeat"
}
}
}Field explanations
window- the time range evaluated.window_seconds=to - fromin seconds.summary.running_seconds- total seconds the app was in arunningorstopped(graceful stop) state within the window. Accounts for interval overlap with window boundaries.summary.stopped_seconds- total gap seconds within the window where no interval record exists (that is, the app was not running and not reporting). This is dead time, not graceful stops.summary.uptime_pct-running_seconds / (running_seconds + stopped_seconds) * 100, rounded to 2 decimal places.summary.interval_count- the number of raw interval records found overlapping the window.current_status- reflects the most recent interval record found.sinceis when that interval started.hb_last_seen_atis the last heartbeat timestamp recorded for that interval. May benullif no data exists for the window.current_status.statusvalues:"running"(app is active),"stopped"(app stopped gracefully).
Errors
400 INVALID_PARAM, 403 FORBIDDEN_NETWORKS, 404 NOT_FOUND (device not found or not in your networks)