Dominevo
ReferenceHTTP API

ptz

The ptz router: 17 methods of the ptz capability, with tier, scope, input and output.

Capability ptz · scope device · mode singleton · source packages/types/src/capabilities/ptz.cap.ts:196.

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

MethodKindTierToken scopeViewer
getStatusqueryprotectedviewyes
movemutationprotectedcreateyes
continuousMovemutationprotectedcreateyes
goHomemutationprotectedcreateyes
getPresetsqueryprotectedviewyes
goToPresetmutationprotectedcreateyes
savePresetmutationadminadmin onlyno
deletePresetmutationadminadmin onlyno
getOptionsqueryprotectedviewyes
stopmutationprotectedcreateyes
getHomePresetqueryprotectedviewyes
setHomePresetmutationadminadmin onlyno
captureHomeHeremutationadminadmin onlyno
getHomeReturnqueryprotectedviewyes
setHomeReturnmutationadminadmin onlyno
getPositionqueryprotectedviewyes
setAutofocusmutationprotectedcreateyes

ptz.getStatus

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

Input

{ deviceId: number }

Output

PtzStatusSchema

Shapes: PtzStatusSchema

ptz.move

  • Kind: mutation — POST /trpc/ptz.move
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability ptz, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=ptz.move on your hub

Input

{ pan?: number; tilt?: number; zoom?: number; speed?: number; deviceId: number }

Output

void

ptz.continuousMove

  • Kind: mutation — POST /trpc/ptz.continuousMove
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability ptz, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=ptz.continuousMove on your hub

Input

{ pan?: number; tilt?: number; zoom?: number; speed?: number; deviceId: number }

Output

void

ptz.goHome

  • Kind: mutation — POST /trpc/ptz.goHome
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability ptz, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=ptz.goHome on your hub

Input

{ deviceId: number }

Output

void

ptz.getPresets

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

Input

{ deviceId: number }

Output

PtzPresetSchema[]

Shapes: PtzPresetSchema

ptz.goToPreset

  • Kind: mutation — POST /trpc/ptz.goToPreset
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability ptz, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=ptz.goToPreset on your hub

Input

{ deviceId: number; presetId: string }

Output

void

ptz.savePreset

  • Kind: mutation — POST /trpc/ptz.savePreset
  • 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=ptz.savePreset on your hub

Input

{ deviceId: number; presetId: string; name: string }

Output

void

ptz.deletePreset

  • Kind: mutation — POST /trpc/ptz.deletePreset
  • 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=ptz.deletePreset on your hub

Input

{ deviceId: number; presetId: string }

Output

void

ptz.getOptions

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

Input

{ deviceId: number }

Output

PtzOptionsSchema

Shapes: PtzOptionsSchema

ptz.stop

  • Kind: mutation — POST /trpc/ptz.stop
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability ptz, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=ptz.stop on your hub

Input

{ deviceId: number }

Output

void

ptz.getHomePreset

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

Input

{ deviceId: number }

Output

PtzHomePresetSchema

Shapes: PtzHomePresetSchema

ptz.setHomePreset

  • Kind: mutation — POST /trpc/ptz.setHomePreset
  • 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=ptz.setHomePreset on your hub

Input

{ deviceId: number; presetId: string | null }

Output

void

ptz.captureHomeHere

  • Kind: mutation — POST /trpc/ptz.captureHomeHere
  • 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=ptz.captureHomeHere on your hub

Input

{ deviceId: number }

Output

void

ptz.getHomeReturn

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

Input

{ deviceId: number }

Output

PtzHomeReturnSchema | null

Shapes: PtzHomeReturnSchema

ptz.setHomeReturn

  • Kind: mutation — POST /trpc/ptz.setHomeReturn
  • 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=ptz.setHomeReturn on your hub

Input

{ deviceId: number; enabled: boolean; seconds: number }

Output

void

ptz.getPosition

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

Input

{ deviceId: number }

Output

PtzPositionSchema

Shapes: PtzPositionSchema

ptz.setAutofocus

  • Kind: mutation — POST /trpc/ptz.setAutofocus
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability ptz, or category device, or a device grant covering deviceId
  • Viewer: yes
  • Try it: open /system/api-explorer?method=ptz.setAutofocus on your hub

Input

{ deviceId: number; enabled: boolean }

Output

void