Music
Preview a draft show
PUT
/api/songs/{id}/show/draftGuest area “effects”. Open unless a PIN lock is set and guests aren't allowed this area (
settings.guest.effects); then it needs an unlock token.Plays an unsaved version on the lights for two minutes without saving it: the show editor's live preview.
Path parameters
idstringrequiredA song id (m…).
Request body application/json
showobject[]colorsobject[]cuesobject[]brightobject[]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 PUT 'http://localhost:8080/api/songs/id/show/draft' \
-H 'content-type: application/json' \
-d '{
"show": [
{
"t0": 0,
"t1": 32,
"part": "calm",
"effect": "aurora"
},
{
"t0": 32,
"t1": 64,
"part": "drop",
"effect": "laser"
}
],
"cues": [
{
"t": 32,
"type": "flash",
"color": "#ffffff"
}
],
"bright": [
{
"t": 0,
"v": 0.4
},
{
"t": 32,
"v": 1
}
]
}'const res = await fetch("http://localhost:8080/api/songs/id/show/draft", {
method: "PUT",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"show": [
{
"t0": 0,
"t1": 32,
"part": "calm",
"effect": "aurora"
},
{
"t0": 32,
"t1": 64,
"part": "drop",
"effect": "laser"
}
],
"cues": [
{
"t": 32,
"type": "flash",
"color": "#ffffff"
}
],
"bright": [
{
"t": 0,
"v": 0.4
},
{
"t": 32,
"v": 1
}
]
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.put(
"http://localhost:8080/api/songs/id/show/draft",
json={
"show": [
{
"t0": 0,
"t1": 32,
"part": "calm",
"effect": "aurora"
},
{
"t0": 32,
"t1": 64,
"part": "drop",
"effect": "laser"
}
],
"cues": [
{
"t": 32,
"type": "flash",
"color": "#ffffff"
}
],
"bright": [
{
"t": 0,
"v": 0.4
},
{
"t": 32,
"v": 1
}
]
},
)
print(res.json())Response
{
"ok": true
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "That song isn't remembered"
}