geofence_Device State

Get device summary for a geofence

Returns aggregate device statistics for a specific geofence — total device count, how many devices are currently inside the boundary, and how many are outside. Use it for a quick, single-call summary rather than pulling the full device list.

Scoped to a single geofence_id and returns counts only, not individual device records — use the devices sub-resource for per-device detail.

About Geofences

A geofence is a virtual geographic boundary tied to device location tracking; devices are continuously evaluated as inside or outside the fence to trigger configured actions. This endpoint gives an at-a-glance rollup of that inside/outside state across all devices tied to the geofence.

Key Fields / Query Parameters

  • geofence_id — path parameter identifying the geofence to summarize

Common Use Cases

  • Powering a geofence dashboard tile showing total/inside/outside device counts
  • Quickly checking compliance for a location-restricted fleet without listing every device
get/geofence/v1/geofences/{geofence_id}/device-summary

Request

  • Base URL
    https://develop-api.esper.cloud/api
  • URL
    https://develop-api.esper.cloud/api/geofence/v1/geofences/{geofence_id}/device-summary
  • Auth
    HTTP bearer

Path parameters

geofence_idstring uuid required

UUID of the geofence

Headers

X-Esper-Tenant-Idstring uuid required

Esper tenant ID associated with the request

X-Caller-Idstring required

Unique identifier for the caller

Response

Device summary retrieved successfully

Example response

{
  "content": {
    "total_devices": 100,
    "inside_count": 60,
    "outside_count": 35,
    "unknown_count": 5
  }
}

Changes

No recorded changes to this operation across all 6 revisions of this API.