---
title: "Get list of heartbeat for all devices"
method: GET
path: "/v2/heartbeat/"
tags: ["device_Device Heartbeat"]
---

# Get list of heartbeat for all devices

`GET /v2/heartbeat/`

Retrieves heartbeat records for all devices whose last-seen timestamp falls within a specified date-time range.

Requires last_seen_gt and last_seen_lt query parameters to define the time window, and optionally filters by platform. Returns a paginated list of EsperDeviceHeartbeat records, each containing device UUID, last-seen timestamp, and a legacy status flag.

**About List Device Heartbeats (V2)**

This endpoint enables bulk connectivity queries across the entire device fleet, useful for fleet health monitoring, SLA reporting, and identifying devices that have gone silent over a defined period. The required time window filters mean queries are always bounded, preventing inadvertent large data pulls. The platform filter can be used to narrow results to a specific OS family. As with the single-device heartbeat endpoint, the status field is a legacy 30-minute binary indicator; use timestamp values directly for precision analysis.

**Key Query Parameters**

last_seen_gt (required) — Start of the time window in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)

last_seen_lt (required) — End of the time window in ISO 8601 format

platform — Optional platform filter: ANDROID, APPLE, LINUX, or WINDOWS

limit / offset — Pagination controls

**Common Use Cases**

Generating daily fleet health reports showing which devices checked in during the past 24 hours

Identifying devices that have gone silent (not seen within a defined window) for incident response

Producing SLA-aligned uptime evidence for specific device cohorts

**Best Practices**

Keep the time window reasonably narrow for large fleets to limit result set size and response latency

Use platform to scope queries when platform-specific reporting is needed

Use timestamp from each result record for precise analysis; do not rely on the legacy status field for business logic

**Workflow**

Define the time window using last_seen_gt and last_seen_lt (both required)

Optionally add platform to narrow results

Paginate through results; devices appearing in the result set were seen within the window

## Query parameters

- `last_seen_gt` string, date-time, required
- `last_seen_lt` string, date-time, required
- `platform` 'ANDROID' | 'APPLE' | 'LINUX' | 'WINDOWS'
- `limit` integer
- `offset` integer

## Response `200`

Last seen details of the device

- object
  - `code` integer
  - `message` string
  - `content` DeviceDeviceLastSeen
    - `count` integer
    - `prev` string
    - `next` string
    - `results` DeviceEsperDeviceHeartbeat[]
      - `device_id` string, uuid — UUID of the device
      - `timestamp` string, date-time — Last seen time stamp of the device
      - `status` 0 | 1 — Legacy field representing whether the device was last seen in the last 30 minutes (returns 1) or not (returns 0).

## Other responses

- `400` — Device create error - Bad Request
- `401` — Authorization information is missing or invalid.
- `500` — Internal Server Error

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/revisions/e1f64cbb488e/schema)
