ReferenceHTTP API
petFountain
The petFountain router: 2 methods of the pet-fountain capability, with tier, scope, input and output.
Capability pet-fountain · scope device · mode singleton · source packages/types/src/capabilities/pet-fountain.cap.ts:78.
Every method is called at /trpc/petFountain.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
petFountain.getStatus
- Kind: query —
GET /trpc/petFountain.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitypet-fountain, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=petFountain.getStatuson your hub
Input
{ deviceId: number }Output
PetFountainStatusSchemaShapes: PetFountainStatusSchema
petFountain.setPump
- Kind: mutation —
POST /trpc/petFountain.setPump - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitypet-fountain, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=petFountain.setPumpon your hub
Input
{ deviceId: number; on: boolean }Output
void