Control Panel — API documentation

Playlists

Playlist object

The playlist object controls an individual playlist for a channel. Playlists are a block of content that is scheduled to play at a specific time. It will continue to loop the playlist until a new playlist replaces it.

You can use this to set the time the playlist is scheduled for and other details.

Descriptions

id Integer Autogenerated

Unique identifier for this object.

Sample value:N/A

cdn_id Integer Autogenerated

The CDN ID that owns this object.

Sample value:8123

name String Normal Required

Playlist Name

String

Sample value:My Playlist Name

app String Normal

Application Name

The application name must begin with "username-"

Sample value:username-chorigin

stream String Normal

Stream Name

May only contain alpha numerical characters, dashes (-), and underscores (_)

Sample value:mystreamname

repeat Boolean Normal

Does this playlist repeat

Boolean

Default:1

Sample value:true

metadata Boolean Normal

Does this playlist push metadata

Boolean

Default:1

Sample value:true

scheduled String Normal Required

Date when this playlist begins

Sample value:2022-07-15 16:55:20

last_modified String Autogenerated

Date when this playlist was last changes

Sample value:2022-07-12 10:50:00

active Boolean Normal

Is this playlist active

Boolean

Default:1

Sample value:true

closed_on String Autogenerated

When the playlist was stopped due to an error

Sample value:2022-07-12 10:50:00

reason String Autogenerated

The error that caused the playlist to stop

Sample value:Hardloop detected, no sources are playing

option:children String

Include child object in results

Default:none

Sample value:playlist_items

app String Normal

Application Name

Sample value:username-chorigin

stream String Normal

Stream Name

Sample value:mystreamname

repeat Boolean Normal

Does this playlist repeat

Sample value:true

metadata Boolean Normal

Does this playlist push metadata

Sample value:true

scheduled String Normal

Date when this playlist begins

Sample value:2022-07-15 16:55:20

last_modified String Autogenerated

Date when this playlist was last changes

Sample value:2022-07-12 10:50:00

active Boolean Normal

Is this playlist active

Sample value:true

closed_on String Autogenerated

When the playlist was stopped due to an error

Sample value:2022-07-12 10:50:00

reason String Autogenerated

The error that caused the playlist to stop

Sample value:Hardloop detected, no sources are playing

None

Child endpoints

Playlist items

Playlist item for a channel

Examples

Get the Playlists object with id My Playlist Name.

Example URL

https://api.scaleengine.net/v2/playlists/My Playlist Name

Example cURL

curl --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/playlists/My Playlist Name

Example request body

None

Example response data

{
    "id": "N/A",
    "cdn_id": "8123",
    "name": "My Playlist Name",
    "app": "username-chorigin",
    "stream": "mystreamname",
    "repeat": "true",
    "metadata": "true",
    "scheduled": "2022-07-15 16:55:20",
    "last_modified": "2022-07-12 10:50:00",
    "active": "true",
    "closed_on": "2022-07-12 10:50:00",
    "reason": "Hardloop detected, no sources are playing"
}

Create a new Playlists object.

Example URL

https://api.scaleengine.net/v2/playlists

Example cURL

curl -X PUT --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/playlists

Example request body

{
    "name": "My Playlist Name",
    "app": "username-chorigin",
    "stream": "mystreamname",
    "repeat": "true",
    "metadata": "true",
    "scheduled": "2022-07-15 16:55:20",
    "active": "true"
}

Example response data

{
    "id": "N/A",
    "cdn_id": "8123",
    "name": "My Playlist Name",
    "app": "username-chorigin",
    "stream": "mystreamname",
    "repeat": "true",
    "metadata": "true",
    "scheduled": "2022-07-15 16:55:20",
    "last_modified": "2022-07-12 10:50:00",
    "active": "true",
    "closed_on": "2022-07-12 10:50:00",
    "reason": "Hardloop detected, no sources are playing"
}

Update the Playlists object with id My Playlist Name.

Example URL

https://api.scaleengine.net/v2/playlists/My Playlist Name

Example cURL

curl -X POST --data-binary @/path/to/request/body --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/playlists/My Playlist Name

Example request body

{
    "name": "My Playlist Name",
    "app": "username-chorigin",
    "stream": "mystreamname",
    "repeat": "true",
    "metadata": "true",
    "scheduled": "2022-07-15 16:55:20",
    "active": "true"
}

Example response data

{
    "id": "N/A",
    "cdn_id": "8123",
    "name": "My Playlist Name",
    "app": "username-chorigin",
    "stream": "mystreamname",
    "repeat": "true",
    "metadata": "true",
    "scheduled": "2022-07-15 16:55:20",
    "last_modified": "2022-07-12 10:50:00",
    "active": "true",
    "closed_on": "2022-07-12 10:50:00",
    "reason": "Hardloop detected, no sources are playing"
}

Delete the Playlists object with id My Playlist Name.

Example URL

https://api.scaleengine.net/v2/playlists/My Playlist Name

Example cURL

curl -X DELETE --user 158:8fc8c48da81e6a2a06a9556379bf798af508dc0792497c678b4c3532ba8b637f https://api.scaleengine.net/v2/playlists/My Playlist Name

Example request body


			
			

Example response data

None

Errors

ACCESS_VIOLATION

You do not have access to modify this field

REQUIRED_FIELD

Missing one or more required fields

TYPE_MISMATCH

Data type does not conform to required field type

MAX_LENGTH_EXCEEDED

The value exceeded maximum length allowed

APP_INVALID

The application name must begin with "username-"

STREAM_INVALID

May only contain alpha numerical characters, dashes (-), and underscores (_)