Devices & room
Remove a device
DEL
/api/devices/{id}Admin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Removes it and its shapes.
Path parameters
idstringrequiredA device id (d…).
Responses
200OKapplication/json
oktruerequired403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
404No such id.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X DELETE 'http://localhost:8080/api/devices/id'const res = await fetch("http://localhost:8080/api/devices/id", {
method: "DELETE",
});
const data = await res.json();
console.log(data);import requests
res = requests.delete(
"http://localhost:8080/api/devices/id",
)
print(res.json())Response
{
"ok": true
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "No such device"
}