Dominevo
ReferenceHTTP API

audioMetrics

The audioMetrics router: 2 methods of the audio-metrics capability, with tier, scope, input and output.

Capability audio-metrics · scope device · mode singleton · source packages/types/src/capabilities/audio-metrics.cap.ts:110.

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

MethodKindTierToken scopeViewer
getCurrentSnapshotqueryprotectedviewyes
getHistoryqueryprotectedviewyes

audioMetrics.getCurrentSnapshot

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

Input

{ deviceId: number }

Output

AudioMetricsSnapshotSchema | null

Shapes: AudioMetricsSnapshotSchema

audioMetrics.getHistory

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

Input

{ deviceId: number; windowSec?: number; sampleEveryMs?: number }

Output

AudioMetricsHistorySchema

Shapes: AudioMetricsHistorySchema