Schedule Profiles
Apply a schedule profile to a stream
POST
https://api.tunio.ai/ v1/ schedule-profiles/ {profile_id}/ applyReplaces 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
| Name | Type | Description |
|---|---|---|
| profile_idRequired | string | Profile ID |
Request body
Target stream and layers to replace
| Name | Type | Description |
|---|---|---|
| layersRequired | array | Which schedules to replace: music, content, or both. |
| [item]Required | string | - |
| stream_idRequired | string | 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
| Name | Type | Description |
|---|---|---|
| applied_content | integer | Number of content slots written to the stream. |
| applied_music | integer | Number of music slots written to the stream. |
| skipped | array | Slots and playlist items left out or changed because what they point at no longer exists or
cannot be carried over. |
| [item]Required | object | - |
| success | boolean | Always true on success. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |