Schedule Profiles
Save a stream's schedule as a profile
POST
https://api.tunio.ai/ v1/ schedule-profilesCaptures the stream's current music and/or content schedule into a new private profile of the caller's library, with self-contained playlist snapshots. Apply it later with POST /v1/schedule-profiles/{profile_id}/apply, for example to roll a schedule back.
请求体
Stream and profile name
| 名称 | 类型 | 说明 |
|---|---|---|
| layers | array | Layers picks what to capture: "music", "content", or both (default both). |
| [item]Required | string | - |
| nameRequired | string | Name is the display name of the profile. |
| stream_idRequired | string | StreamID is the stream whose schedule is captured. |
请求示例
01{02 "layers": [03 "string"04 ],05 "name": "Before holiday changes",06 "stream_id": "5a0c8a52-2f7e-4c1b-8d3e-9f0a1b2c3d4e"07}
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| profile | object | - |
| content_slots | integer | ContentSlots is the number of content slots stored in the profile. |
| created_at | string | CreatedAt is when the profile was first saved. |
| has_content | boolean | HasContent reports whether the profile carries a content schedule layer. |
| has_music | boolean | HasMusic reports whether the profile carries a music schedule layer at all,
which a slot count cannot: a stored but empty layer clears the target on apply. |
| is_auto_snapshot | boolean | IsAutoSnapshot marks a snapshot taken automatically before a schedule replace (PUT); only the last 20 per stream are kept. |
| music_slots | integer | MusicSlots is the number of music slots stored in the profile. |
| name | string | Name is the display name given to the profile. |
| profile_id | string | ProfileID is the unique identifier of the saved profile. |
| updated_at | string | UpdatedAt is when the profile was last overwritten or renamed. |
| success | boolean | - |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |
| 名称 | 类型 | 说明 |
|---|---|---|
| message | string | Message contains human readable error details. |
| success | boolean | Success is always false for error payloads. |