Devices & room
Get the room
GET
/api/roomOpen. Open to everyone who can reach Tempolight.
The room's name, shapes and zones.
Responses
200OKapplication/json
namestringshapesobject[]zonesobject[]Request
curl 'http://localhost:8080/api/room'const res = await fetch("http://localhost:8080/api/room");
const data = await res.json();
console.log(data);import requests
res = requests.get(
"http://localhost:8080/api/room",
)
print(res.json())Response
{
"name": "My room",
"shapes": [
{
"type": "line",
"name": "Desk strip",
"count": 120,
"dev": "d4k2x9",
"rot": 0,
"start": 0,
"rev": false,
"from": null,
"zone": null,
"pts": [
[
1.5,
6
],
[
14.5,
6
]
]
}
],
"zones": []
}