ReferenceHTTP API
pumpCycle
The pumpCycle router: 4 methods of the pump-cycle capability, with tier, scope, input and output.
Capability pump-cycle · scope device · mode singleton · source packages/types/src/capabilities/pump-cycle.cap.ts:37.
Every method is called at /trpc/pumpCycle.<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 |
setEnabled | mutation | protected | create | yes |
setOnMinutes | mutation | protected | create | yes |
setOffMinutes | mutation | protected | create | yes |
pumpCycle.getStatus
- Kind: query —
GET /trpc/pumpCycle.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitypump-cycle, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=pumpCycle.getStatuson your hub
Input
{ deviceId: number }Output
PumpCycleStatusSchemaShapes: PumpCycleStatusSchema
pumpCycle.setEnabled
- Kind: mutation —
POST /trpc/pumpCycle.setEnabled - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitypump-cycle, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=pumpCycle.setEnabledon your hub
Input
{ deviceId: number; on: boolean }Output
voidpumpCycle.setOnMinutes
- Kind: mutation —
POST /trpc/pumpCycle.setOnMinutes - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitypump-cycle, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=pumpCycle.setOnMinuteson your hub
Input
{ deviceId: number; minutes: number }Output
voidpumpCycle.setOffMinutes
- Kind: mutation —
POST /trpc/pumpCycle.setOffMinutes - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitypump-cycle, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=pumpCycle.setOffMinuteson your hub
Input
{ deviceId: number; minutes: number }Output
void