ReferenceHTTP API
networkQuality
The networkQuality router: 3 methods of the network-quality capability, with tier, scope, input and output.
Capability network-quality · scope system · mode singleton · source packages/types/src/capabilities/network-quality.cap.ts:47.
Every method is called at /trpc/networkQuality.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getDeviceStats | query | protected | view | no |
getAllStats | query | protected | view | no |
reportClientStats | mutation | protected | create | yes |
networkQuality.getDeviceStats
- Kind: query —
GET /trpc/networkQuality.getDeviceStats - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitynetwork-quality, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=networkQuality.getDeviceStatson your hub
Input
{ deviceId: number }Output
DeviceNetworkStatsSchema | nullShapes: DeviceNetworkStatsSchema
networkQuality.getAllStats
- Kind: query —
GET /trpc/networkQuality.getAllStats - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitynetwork-quality, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=networkQuality.getAllStatson your hub
Input
voidOutput
DeviceNetworkStatsSchema[]Shapes: DeviceNetworkStatsSchema
networkQuality.reportClientStats
- Kind: mutation —
POST /trpc/networkQuality.reportClientStats - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitynetwork-quality, or categorysystem - Viewer: yes
- Try it: open
/system/api-explorer?method=networkQuality.reportClientStatson your hub
Input
{ deviceId: number; rttMs: number; jitterMs: number; estimatedBandwidthKbps: number; packetLossPercent: number; downlinkMbps?: number; downlinkAgeMs?: number }Output
void