Dominevo
ReferenceHTTP API

zoneAnalytics

The zoneAnalytics router: 5 methods of the zone-analytics capability, with tier, scope, input and output.

Capability zone-analytics · scope device · mode singleton · source packages/types/src/capabilities/zone-analytics.cap.ts:203.

Every method is called at /trpc/zoneAnalytics.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.

MethodKindTierToken scopeViewer
getCurrentSnapshotqueryprotectedviewyes
getCurrentSnapshotBatchqueryprotectedviewyes
getZoneHistoryqueryprotectedviewyes
getCameraHistoryqueryprotectedviewyes
getUnzonedHistoryqueryprotectedviewyes

zoneAnalytics.getCurrentSnapshot

  • Kind: query — GET /trpc/zoneAnalytics.getCurrentSnapshot
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability zone-analytics, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=zoneAnalytics.getCurrentSnapshot on your hub

Input

{ deviceId: number }

Output

{ ts: number; frameWidth: number; frameHeight: number; zones: ZoneScopeBreakdownSchema[]; frame: PerScopeBreakdownSchema; unzoned: PerScopeBreakdownSchema; stationaryObjects?: StationaryObjectSchema[] } | null

Shapes: ZoneScopeBreakdownSchema · PerScopeBreakdownSchema · StationaryObjectSchema

zoneAnalytics.getCurrentSnapshotBatch

  • Kind: query — GET /trpc/zoneAnalytics.getCurrentSnapshotBatch
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability zone-analytics, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=zoneAnalytics.getCurrentSnapshotBatch on your hub

Input

{ deviceIds: number[] }

Output

CameraOccupancySnapshotForDeviceSchema[]

Shapes: CameraOccupancySnapshotForDeviceSchema

zoneAnalytics.getZoneHistory

  • Kind: query — GET /trpc/zoneAnalytics.getZoneHistory
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability zone-analytics, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=zoneAnalytics.getZoneHistory on your hub

Input

{ deviceId: number; zoneId: string; className?: string; from: number; to: number; resolution: HistoryResolutionEnum }

Output

HistoryPointSchema[]

Shapes: HistoryResolutionEnum · HistoryPointSchema

zoneAnalytics.getCameraHistory

  • Kind: query — GET /trpc/zoneAnalytics.getCameraHistory
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability zone-analytics, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=zoneAnalytics.getCameraHistory on your hub

Input

{ deviceId: number; className?: string; from: number; to: number; resolution: HistoryResolutionEnum }

Output

HistoryPointSchema[]

Shapes: HistoryResolutionEnum · HistoryPointSchema

zoneAnalytics.getUnzonedHistory

  • Kind: query — GET /trpc/zoneAnalytics.getUnzonedHistory
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability zone-analytics, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=zoneAnalytics.getUnzonedHistory on your hub

Input

{ deviceId: number; className?: string; from: number; to: number; resolution: HistoryResolutionEnum }

Output

HistoryPointSchema[]

Shapes: HistoryResolutionEnum · HistoryPointSchema