Skip to content

Commit a51fd85

Browse files
committed
add juice to readme
1 parent ea30426 commit a51fd85

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,72 @@ docker run -d \
4242
- `-e "OPENRGB_PORT=<port>"`: `<port>` defines the port the tcp server serves on, in the example above exposed as `6742`
4343
- `-p x:3000`: `x` defines the port this http server should be accessible on, in this case 6744
4444

45+
## Rest Api
46+
47+
### Getting all devices
48+
49+
`GET` /devices
50+
51+
Retrieves the full list of all compatible hardware on the host machine, returned as a JSON
52+
53+
### Getting info for a specific device
54+
55+
`GET` /devices/:id
56+
57+
Retrieves the details for only the hardware specified by its id, returned as a JSON
58+
59+
### Setting RGB lighting
60+
61+
`POST` /devices/:id/leds
62+
63+
Sets the RGB led light colors & effects for a specific or all led's at once.
64+
Values are case insensitive, trying a non-existing mode will return valid options.
65+
Returns the result as a JSON, e.g.:
66+
67+
```json
68+
{
69+
"deviceId": 0,
70+
"deviceName": "X570 I AORUS PRO WIFI",
71+
"leds": 5,
72+
"color": {
73+
"red": 255,
74+
"green": 255,
75+
"blue": 0
76+
},
77+
"mode": "direct"
78+
}
79+
```
80+
81+
Request Examples:
82+
83+
#### Set the last led to steady red
84+
85+
```json
86+
{
87+
"color": {
88+
"red": 255,
89+
"green": 0,
90+
"blue": 0
91+
},
92+
"mode": "direct",
93+
"ledIndex": "0"
94+
}
95+
```
96+
97+
#### Set all led's to breathing dim green
98+
99+
```json
100+
{
101+
"color": {
102+
"red": 0,
103+
"green": 100,
104+
"blue": 0
105+
},
106+
"mode": "breathing",
107+
"ledIndex": "x"
108+
}
109+
```
110+
45111
### Test CLI Compatibility
46112

47113
Check if your machine's RGB devices can be controlled inside the container. If OpenRGB works on your host, this usually works too.

0 commit comments

Comments
 (0)