Schedule Profiles

Apply a schedule profile to a stream

POST
https://api.tunio.ai/v1/schedule-profiles/{profile_id}/apply

Replaces the selected schedules (layers) of the target stream with the profile's. Each selected layer that the profile carries is fully replaced, not merged; a selected layer the profile does not carry (has_music or has_content false) is left untouched. No automatic snapshot is taken: save the current schedule first with POST /v1/schedule-profiles if you may want it back. Slots whose playlist or content no longer exists are skipped and reported instead of failing the request.

Path parameters

NameTypeDescription
profile_idRequiredstringProfile ID

Request body

Target stream and layers to replace

NameTypeDescription
layersRequiredarray
Which schedules to replace: music, content, or both.
[item]Requiredstring
-
stream_idRequiredstring
UUID of the stream whose schedule is replaced; it must be the caller's.
Request example
01{
02 "layers": [
03 "music",
04 "content"
05 ],
06 "stream_id": "5a0c8a52-2f7e-4c1b-8d3e-9f0a1b2c3d4e"
07}

Responses

NameTypeDescription
applied_contentinteger
Number of content slots written to the stream.
applied_musicinteger
Number of music slots written to the stream.
skippedarray
Slots and playlist items left out or changed because what they point at no longer exists or cannot be carried over.
[item]Requiredobject
-
successboolean
Always true on success.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.