Music
Save a song's show
PUT
/api/songs/{id}/showGuest 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.Your own timeline for the song; fields left out are kept.
Path parameters
idstringrequiredA song id (m…).
Request body application/json
showobject[]colorsobject[]cuesobject[]brightobject[]Responses
200OKapplication/json
oktruerequiredidstringnamestringdurnumbereditedbooleanshowobject[]colorsobject[]cuesobject[]brightobject[]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.
404No such id.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X PUT 'http://localhost:8080/api/songs/m9x2q1/show' \
-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/m9x2q1/show", {
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/m9x2q1/show",
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,
"id": "m9x2q1",
"name": "One More Time",
"dur": 320.4,
"edited": true,
"show": [
{
"t0": 0,
"t1": 32,
"part": "calm",
"effect": "aurora"
}
],
"colors": [],
"cues": [],
"bright": []
}{
"error": "show is a list of {t0, t1, effect}"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "That song isn't remembered"
}