Backup & updates
Update and restart
POST
/api/updateAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Pulls the new version and restarts Tempolight (installs made with git or the installer). 409 when it can't now.
Responses
200OKapplication/json
object
What was done.
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
409
Request
curl -X POST 'http://localhost:8080/api/update'const res = await fetch("http://localhost:8080/api/update", {
method: "POST",
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/update",
)
print(res.json())Response
{}{
"error": "Nothing to update in the online demo"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}