Skip to content
OAOpenAppPhysical Security as a Service
Login

Zones

Zones partition devices within an integration (floors, wings, apartments, …). All routes require X-Org — see Organization context & pagination. Response bodies follow ZoneResponse; mutations use CreateZoneRequest / UpdateZoneRequest (both use LocalizedString for display names) — see the API reference.

There is no org-wide GET /zones in the public bundle: discovery is GET /integrations/{integration_id}/zones (list_integration_zones). POST /zones supplies integration_id in the body.

ConcernHTTPoperationIdNotes
List for integrationGET /integrations/{integration_id}/zoneslist_integration_zonesX-Org required; optional include_deleted, only_deleted, include_metadata. Returns ZoneResponse[].
CreatePOST /zonescreate_zoneBody CreateZoneRequest: integration_id, name (LocalizedString), optional parent_zone_id, external_id.
GetGET /zones/{id}get_zoneX-Org + optional deleted/metadata flags.
UpdatePUT /zones/{id}update_zoneBody UpdateZoneRequest.
Soft deleteDELETE /zones/{id}delete_zone
Hard deleteDELETE /zones/{id}/purgehard_delete_zone
CapabilityPythonRust (openapp_sdk)GoTypeScript (AsyncClient)
Lifecycle + list-by-integrationclient.zonescreate, get, update, delete, purge, by_integrationclient.zones() — sameZonesAPINot on façade

Thin wrappers send JSON bodies matching OpenAPI; extend transport + RequestSpec when you need full query/header parity on every route variant.

401 / 403 when the caller cannot access the org or integration.404 for unknown zone or integration ids.422 on invalid payloads.400 on list_integration_zones. Errors follow ApiErrorResponse — see Errors & retries.

zones = await client.zones.by_integration("int_abc123")

Ensure org context ( X-Org ) is configured on the client for integration-scoped routes.

zone = await client.zones.create(
integration_id="int_abc123",
name={"value": {"en": "Lobby"}},
)

X-Org is required; optional include_deleted / include_metadata query flags surface soft-deleted rows or expanded metadata for dashboards.

zone = await client.zones.get(zone_id)

For deleted/metadata flags, send the request via AsyncClient._request with explicit query keys until the helper exposes them.

Body UpdateZoneRequest — all fields optional: name (LocalizedString), parent_zone_id, external_id. Replaces the row (no merge).

updated = await client.zones.update(
zone_id,
name={"value": {"en": "Lobby (renamed)"}},
)

Soft delete and hard delete (DELETE /zones/{id}, DELETE /zones/{id}/purge)

Section titled “Soft delete and hard delete (DELETE /zones/{id}, DELETE /zones/{id}/purge)”

delete_zone is reversible at the data layer (the row stays under include_deleted=true); hard_delete_zone removes the row irrecoverably. Both require X-Org. There is no dedicated restore route in the published bundle — recover by re-querying with include_deleted=true and re-creating if needed.

await client.zones.delete(zone_id)
await client.zones.purge(zone_id)