ReferenceHTTP API
snapshot
The snapshot router: 9 methods of the snapshot capability, with tier, scope, input and output.
Capability snapshot · scope device · mode singleton · source packages/types/src/capabilities/snapshot.cap.ts:60.
Every method is called at /trpc/snapshot.<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 |
getDeviceSettingsContribution | query | protected | view | yes |
getDeviceLiveContribution | query | protected | view | yes |
applyDeviceSettingsPatch | mutation | admin | admin only | no |
getSnapshot | query | protected | view | yes |
invalidateCache | mutation | admin | admin only | no |
getSnapshotOverview | query | protected | view | yes |
getDebugState | query | protected | view | yes |
getSnapshotLinks | query | protected | view | yes |
snapshot.getStatus
- Kind: query —
GET /trpc/snapshot.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysnapshot, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=snapshot.getStatuson your hub
Input
{ deviceId: number }Output
{ lastCapturedAt: number | null; cacheAgeMs: number | null; lastBytes: number | null; lastStreamId: string | null }snapshot.getDeviceSettingsContribution
- Kind: query —
GET /trpc/snapshot.getDeviceSettingsContribution(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysnapshot, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=snapshot.getDeviceSettingsContributionon your hub
Input
{ deviceId: number }Output
{ tabs?: ({ id: string; label: string; icon: string; order?: number })[]; sections: ({ id: string; title: string; description?: string; style?: "card" | "accordion"; defaultCollapsed?: boolean; columns?: 1 | 2 | 3 | 4; tab?: string; location?: "settings" | "top-tab" | "hero"; order?: number; fields: any[] })[] } | nullsnapshot.getDeviceLiveContribution
- Kind: query —
GET /trpc/snapshot.getDeviceLiveContribution(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysnapshot, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=snapshot.getDeviceLiveContributionon your hub
Input
{ deviceId: number }Output
{ tabs?: ({ id: string; label: string; icon: string; order?: number })[]; sections: ({ id: string; title: string; description?: string; style?: "card" | "accordion"; defaultCollapsed?: boolean; columns?: 1 | 2 | 3 | 4; tab?: string; location?: "settings" | "top-tab" | "hero"; order?: number; fields: any[] })[] } | nullsnapshot.applyDeviceSettingsPatch
- Kind: mutation —
POST /trpc/snapshot.applyDeviceSettingsPatch(added by the framework) - 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=snapshot.applyDeviceSettingsPatchon your hub
Input
{ deviceId: number; patch: Record<string, unknown> }Output
{ success: true }snapshot.getSnapshot
- Kind: query —
GET /trpc/snapshot.getSnapshot - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysnapshot, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=snapshot.getSnapshoton your hub
Input
{ deviceId: number; streamId?: string; force?: boolean }Output
SnapshotImageSchema | nullShapes: SnapshotImageSchema
snapshot.invalidateCache
- Kind: mutation —
POST /trpc/snapshot.invalidateCache - 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=snapshot.invalidateCacheon your hub
Input
{ deviceId: number }Output
voidsnapshot.getSnapshotOverview
- Kind: query —
GET /trpc/snapshot.getSnapshotOverview - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysnapshot, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=snapshot.getSnapshotOverviewon your hub
Input
{ deviceIds: number[] }Output
({ deviceId: number; lastCapturedAt: number | null; cacheAgeMs: number | null; etag: string | null })[]snapshot.getDebugState
- Kind: query —
GET /trpc/snapshot.getDebugState - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysnapshot, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=snapshot.getDebugStateon your hub
Input
{ deviceId: number }Output
{ battery: { sleeping: boolean; lastUpdated: number; lastContactAt?: number } | null; state: { isBattery: boolean; reason: "disabled" | "offline" | "sleeping" | "unreachable" | "waking" | null }; frame: { capturedAt: number | null; ageMs: number | null }; waking: boolean }snapshot.getSnapshotLinks
- Kind: query —
GET /trpc/snapshot.getSnapshotLinks - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitysnapshot, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=snapshot.getSnapshotLinkson your hub
Input
{ targets: ({ deviceId: number; width?: number })[] }Output
({ deviceId: number; url: string | null; capturedAt: number | null; ageMs: number | null; expiresAt: number | null; width: number | null; neverCaptured: boolean; sleeping: boolean; stateReason: "disabled" | "offline" | "sleeping" | "unreachable" | "waking" | null; battery: boolean })[]