ReferenceHTTP API
color
The color router: 2 methods of the color capability, with tier, scope, input and output.
Capability color · scope device · mode singleton · source packages/types/src/capabilities/color.cap.ts:80.
Every method is called at /trpc/color.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
color.getStatus
- Kind: query —
GET /trpc/color.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitycolor, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=color.getStatuson your hub
Input
{ deviceId: number }Output
ColorStatusSchemaShapes: ColorStatusSchema
color.setColor
- Kind: mutation —
POST /trpc/color.setColor - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilitycolor, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=color.setColoron your hub
Input
{ deviceId: number; color: { mode: "rgb"; rgb: { r: number; g: number; b: number } } | { mode: "hsv"; hsv: { h: number; s: number; v: number } } | { mode: "mired"; colorTemperature: number } }Output
void