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.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
move | mutation | protected | create | yes |
continuousMove | mutation | protected | create | yes |
goHome | mutation | protected | create | yes |
getPresets | query | protected | view | yes |
goToPreset | mutation | protected | create | yes |
savePreset | mutation | admin | admin only | no |
deletePreset | mutation | admin | admin only | no |
getOptions | query | protected | view | yes |
stop | mutation | protected | create | yes |
getHomePreset | query | protected | view | yes |
setHomePreset | mutation | admin | admin only | no |
captureHomeHere | mutation | admin | admin only | no |
getHomeReturn | query | protected | view | yes |
setHomeReturn | mutation | admin | admin only | no |
getPosition | query | protected | view | yes |
setAutofocus | mutation | protected | create | yes |
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:
viewon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.getStatuson your hub
Input
{ deviceId: number }Output
PtzStatusSchemaShapes: PtzStatusSchema
ptz.move
- Kind: mutation —
POST /trpc/ptz.move - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.moveon your hub
Input
{ pan?: number; tilt?: number; zoom?: number; speed?: number; deviceId: number }Output
voidptz.continuousMove
- Kind: mutation —
POST /trpc/ptz.continuousMove - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.continuousMoveon your hub
Input
{ pan?: number; tilt?: number; zoom?: number; speed?: number; deviceId: number }Output
voidptz.goHome
- Kind: mutation —
POST /trpc/ptz.goHome - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.goHomeon your hub
Input
{ deviceId: number }Output
voidptz.getPresets
- Kind: query —
GET /trpc/ptz.getPresets - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.getPresetson 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:
createon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.goToPreseton your hub
Input
{ deviceId: number; presetId: string }Output
voidptz.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.savePreseton your hub
Input
{ deviceId: number; presetId: string; name: string }Output
voidptz.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.deletePreseton your hub
Input
{ deviceId: number; presetId: string }Output
voidptz.getOptions
- Kind: query —
GET /trpc/ptz.getOptions - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.getOptionson your hub
Input
{ deviceId: number }Output
PtzOptionsSchemaShapes: PtzOptionsSchema
ptz.stop
- Kind: mutation —
POST /trpc/ptz.stop - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.stopon your hub
Input
{ deviceId: number }Output
voidptz.getHomePreset
- Kind: query —
GET /trpc/ptz.getHomePreset - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.getHomePreseton your hub
Input
{ deviceId: number }Output
PtzHomePresetSchemaShapes: 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.setHomePreseton your hub
Input
{ deviceId: number; presetId: string | null }Output
voidptz.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.captureHomeHereon your hub
Input
{ deviceId: number }Output
voidptz.getHomeReturn
- Kind: query —
GET /trpc/ptz.getHomeReturn - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.getHomeReturnon your hub
Input
{ deviceId: number }Output
PtzHomeReturnSchema | nullShapes: 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.setHomeReturnon your hub
Input
{ deviceId: number; enabled: boolean; seconds: number }Output
voidptz.getPosition
- Kind: query —
GET /trpc/ptz.getPosition - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.getPositionon your hub
Input
{ deviceId: number }Output
PtzPositionSchemaShapes: PtzPositionSchema
ptz.setAutofocus
- Kind: mutation —
POST /trpc/ptz.setAutofocus - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityptz, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=ptz.setAutofocuson your hub
Input
{ deviceId: number; enabled: boolean }Output
void