Dominevo
ReferenceHTTP API

motionZones

The motionZones router: 3 methods of the motion-zones capability, with tier, scope, input and output.

Capability motion-zones · scope device · mode singleton · source packages/types/src/capabilities/motion-zones.cap.ts:57.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
getOptionsqueryprotectedviewyes
setZonemutationadminadmin onlyno

motionZones.getStatus

  • Kind: query — GET /trpc/motionZones.getStatus (added by the framework)
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability motion-zones, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=motionZones.getStatus on your hub

Input

{ deviceId: number }

Output

MotionZoneStatusSchema

Shapes: MotionZoneStatusSchema

motionZones.getOptions

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

Input

{ deviceId: number }

Output

MotionZoneOptionsSchema

Shapes: MotionZoneOptionsSchema

motionZones.setZone

  • Kind: mutation — POST /trpc/motionZones.setZone
  • Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
  • Token scope: none — the admin tier needs an administrator (a * token or an admin session)
  • Viewer: no
  • Try it: open /system/api-explorer?method=motionZones.setZone on your hub

Input

{ deviceId: number; patch: MotionZonePatchSchema }

Output

void

Shapes: MotionZonePatchSchema