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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getCurrentSnapshot | query | protected | view | yes |
getCurrentSnapshotBatch | query | protected | view | yes |
getZoneHistory | query | protected | view | yes |
getCameraHistory | query | protected | view | yes |
getUnzonedHistory | query | protected | view | yes |
zoneAnalytics.getCurrentSnapshot
- Kind: query —
GET /trpc/zoneAnalytics.getCurrentSnapshot - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityzone-analytics, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=zoneAnalytics.getCurrentSnapshoton your hub
Input
{ deviceId: number }Output
{ ts: number; frameWidth: number; frameHeight: number; zones: ZoneScopeBreakdownSchema[]; frame: PerScopeBreakdownSchema; unzoned: PerScopeBreakdownSchema; stationaryObjects?: StationaryObjectSchema[] } | nullShapes: ZoneScopeBreakdownSchema · PerScopeBreakdownSchema · StationaryObjectSchema
zoneAnalytics.getCurrentSnapshotBatch
- Kind: query —
GET /trpc/zoneAnalytics.getCurrentSnapshotBatch - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityzone-analytics, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=zoneAnalytics.getCurrentSnapshotBatchon 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:
viewon capabilityzone-analytics, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=zoneAnalytics.getZoneHistoryon 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:
viewon capabilityzone-analytics, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=zoneAnalytics.getCameraHistoryon 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:
viewon capabilityzone-analytics, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=zoneAnalytics.getUnzonedHistoryon your hub
Input
{ deviceId: number; className?: string; from: number; to: number; resolution: HistoryResolutionEnum }Output
HistoryPointSchema[]Shapes: HistoryResolutionEnum · HistoryPointSchema