Skip to content

Get device summary for a geofence

Request

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
Security
geofence_bearerAuth
Path
geofence_idstring, (uuid)required

UUID of the geofence

Example:f5316a75-f186-4769-970e-28d6a1a0e110
Headers
X-Esper-Tenant-Idstring, (uuid)required

Esper tenant ID associated with the request

X-Caller-Idstring, [ 1 .. 255 ] charactersrequired

Unique identifier for the caller

cURL
curl -i -X GET \
  https://api.esper.io/_mock/openapi/geofence/v1/geofences/f5316a75-f186-4769-970e-28d6a1a0e110/device-summary \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'X-Caller-Id: string' \
  -H 'X-Esper-Tenant-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08'

Responses

Device summary retrieved successfully

Bodyapplication/json
contentobject(geofence_DeviceSummaryResponse)

Summary statistics of devices in relation to a geofence

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