Skip to content

List all geofences

Request

Retrieves a paginated list of geofences configured for the tenant. Use it to enumerate all geofences, optionally narrowed down by ID or name.

Supports filtering by a list of geofence IDs, an exact name match, or a free-text name search, and can optionally include device summary statistics and/or a total count alongside each geofence in the response.

About Geofences

A geofence is a virtual geographic boundary (defined by a location and radius) that triggers device actions — such as locking down or sounding an alert — when a managed device enters or leaves the area. Geofences can also be tied to blueprints so that specific device configurations apply based on location.

Key Fields / Query Parameters

  • geofence IDs — filter to a specific set of geofences by ID
  • name — exact-match filter on geofence name
  • search — free-text search across geofence names
  • include device summary statistics — optionally embed device counts for each geofence in the list response

Common Use Cases

  • Building a geofence management view that lists all configured boundaries
  • Looking up a geofence by name before fetching its device or blueprint details
  • Getting a quick device-count overview per geofence without a separate call
Security
geofence_bearerAuth
Query
offsetinteger, >= 0

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

Default:0
limitinteger, [ 1 .. 100 ]

Maximum number of items to return

Default:10
idsstring^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}...

Comma-separated list of geofence UUIDs to filter by. When provided, only geofences with matching IDs will be returned.

Example:ids=11111111-1111-1111-1111-111111111111,22222222-2222-2222-2222-222222222222
include_summaryboolean

Whether to include device summary and blueprint usage statistics with each geofence. When true, adds device_summary and blueprints fields to each result.

Default:false
Example:include_summary=true
include_countboolean

Whether to include the total count of geofences in the response. When true, adds a count field to the response.

Default:false
Example:include_count=true
searchstring

Search string to filter geofences by name (case-insensitive partial match).

Example:search=warehouse
namestring

Exact geofence name to filter by (case-sensitive exact match).

Example:name=Test Geofence 1
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?offset=0&limit=10&ids=11111111-1111-1111-1111-111111111111%2C22222222-2222-2222-2222-222222222222&include_summary=true&include_count=true&search=warehouse&name=Test%20Geofence%201' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'X-Caller-Id: string' \
  -H 'X-Esper-Tenant-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08'

Responses

A list of geofences

Bodyapplication/json
contentobject
Response
{ "content": { "next": "/v1/geofences?offset=10&limit=10", "previous": null, "results": [] } }