v1

latestOpenAPI 3.0.1Apache 2.02026-08-063494581.6 MB
geofence_Geofences

List all geofences

Retrieves a paginated list of geofences for the tenant. Supports filtering by geofence IDs, exact name match, or searching by name. Optionally include device summary statistics and/or total count.

get/geofence/v1/geofences

Query parameters

offsetinteger

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

limitinteger

Maximum number of items to return

idsstring

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

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.

include_countboolean

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

searchstring

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

namestring

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

Headers

X-Esper-Tenant-Idstring uuid required

Esper tenant ID associated with the request

X-Caller-Idstring required

Unique identifier for the caller

Response

A list of geofences

Example response

{
  "content": {
    "next": "/v1/geofences?offset=10&limit=10",
    "count": 42,
    "results": [
      {
        "id": "11111111-1111-1111-1111-111111111111",
        "name": "Warehouse Perimeter",
        "description": "A polygon-shaped geofence",
        "actions": [
          "lockdown",
          "beep"
        ],
        "geometry": {
          "type": "polygon",
          "coordinates": [
            {
              "latitude": 41.8902,
              "longitude": 12.4924
            },
            {
              "latitude": 41.8903,
              "longitude": 12.4925
            },
            {
              "latitude": 41.8904,
              "longitude": 12.4926
            }
          ]
        },
        "created_at": "2024-06-24T14:00:00Z",
        "updated_at": "2024-06-24T15:00:00Z",
        "device_summary": {
          "total_devices": 100,
          "inside_count": 60,
          "outside_count": 35,
          "unknown_count": 5
        },
        "blueprints": [
          {
            "blueprint_id": "550e8400-e29b-41d4-a716-446655440000",
            "blueprint_version_number": 1,
            "device_count": 25
          }
        ]
      }
    ]
  }
}