ReferenceHTTP API
button
The button router: 1 method of the button capability, with tier, scope, input and output.
Capability button · scope device · mode singleton · source packages/types/src/capabilities/button.cap.ts:16.
Every method is called at /trpc/button.<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 |
|---|---|---|---|---|
press | mutation | protected | create | yes |
button.press
- Kind: mutation —
POST /trpc/button.press - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitybutton, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=button.presson your hub
Input
{ deviceId: number }Output
void