geofence_Device State

Get devices for a geofence

Returns a paginated list of devices and their current state relative to a specific geofence. Use it when you need the actual device records, not just aggregate counts.

Supports filtering by inside/outside status and by blueprint version ID, so you can drill into, for example, only the devices currently outside the boundary running a particular blueprint version.

About Geofences

A geofence is a virtual geographic boundary tied to device location tracking, and can be associated with blueprint-driven configuration so a device's blueprint version may factor into how it's managed inside vs. outside the fence. This endpoint exposes the per-device detail behind the aggregate device-summary statistics.

Key Fields / Query Parameters

  • geofence_id — path parameter identifying the geofence
  • inside/outside status — filters devices by whether they are currently within the geofence boundary
  • blueprint version ID — filters devices by the blueprint version they're currently running

Common Use Cases

  • Listing devices that have left a geofenced area for follow-up or remediation
  • Cross-referencing which blueprint versions are running on devices inside vs. outside a boundary
get/geofence/v1/geofences/{geofence_id}/devices

Request

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

Path parameters

geofence_idstring uuid required

UUID of the geofence

Query parameters

offsetinteger

Number of items to skip before starting to collect the result set

limitinteger

Maximum number of items to return

insideboolean

Filter devices by whether they are inside (true) or outside (false) the geofence

blueprint_idstring uuid

Filter devices by blueprint ID

blueprint_version_numberinteger

Filter devices by blueprint version number

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 list retrieved successfully

Example response

{
  "content": {
    "next": "/v1/geofences/f5316a75-f186-4769-970e-28d6a1a0e110/devices?offset=10&limit=10",
    "results": [
      {
        "device_id": "660e8400-e29b-41d4-a716-446655440000",
        "blueprint_id": "550e8400-e29b-41d4-a716-446655440000",
        "blueprint_version_number": 1,
        "inside": true,
        "state_changed_at": "2025-07-24T09:00:00Z",
        "latitude": 37.7749,
        "longitude": -122.4194,
        "location_updated_at": "2025-07-24T09:05:00Z"
      }
    ]
  }
}

Changes

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