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.

路径参数

名称类型说明
profile_idRequiredstringProfile ID

请求体

Target stream and layers to replace

名称类型说明
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.
请求示例
01{
02 "layers": [
03 "music",
04 "content"
05 ],
06 "stream_id": "5a0c8a52-2f7e-4c1b-8d3e-9f0a1b2c3d4e"
07}

响应

名称类型说明
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.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
名称类型说明
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.