Skip to content

Playlists

Get all Playlists

GET /api/playlists

Returns all the Playlists that are currently available in your Erizos Studio environment.

Response

The response is an array of Playlists

Get Playlist by ID

GET /api/playlists/[ID]

Returns the playlist that corresponds to the playlist ID.

Request

Parameter Type Description
ID Uuid id of the Playlist

Response

Playlist Object

Create Playlist

POST /api/playlists

Creates a new playlist for a show.

Request Body

{
    "show": "5e1b51d0c6e1457e208d119b",
    "name": "My Playist",
    "items": []
}

Parameter Value Description
_id Uuid The id of the playlist
show UUid The id of the show the playlist belongs to
name String The name of the playlist
items Array A list of elements in the playlist (pages or groups)
createdAt Date Date and time the playlist was created
updatedAt Date Date and time the playlist was last updated

Response Body

{
    "_id": "5e1b55bfc6e1457e208d11b7",
    "show": "5e1b51d0c6e1457e208d119b",
    "name": "My Playlist",
    "items": [],
    "createdAt": "2020-01-12T17:22:07.154Z",
    "updatedAt": "2020-01-12T17:22:07.154Z",
}

Parameter Value Description
_id Uuid The id of the playlist
show Uuid The id of the show the playlist belongs to
name String The name of the playlist
items Array A list of pages in the playlist
createdAt Date Date and time the playlist was created
updatedAt Date Date and time the playlist was last updated

Rename a Playlist

PUT /api/playlists/[ID]

Updates the playlist name.

Request

Parameter Type Description
ID Uuid id of the Playlist

Request Body

{
    "name": [PLAYLIST NAME (STRING)],
}

Response

The updated Playlist object.

Delete Playlist by ID

DELETE /api/playlists/[ID]

Deletes the playlist that corresponds to the playlist ID.

Request

Parameter Type Description
ID Uuid id of the Playlist

Create a New Group in Playlist

POST /api/playlists/[ID]/items/add/group

Creates a new group in a playlist.

Request Body

{
  "name": "My New Group",
  "parent": "5dada247f0f446a83ef4a3ed",
  "position": "A Description of My Page"
}

Parameter Value Description
name String The name of the page
parent UUid The parent item of the group, null = root
position Number The position of the group in the playlist (0 = First, null = last)

Response Body

{
    "_id": "5f4921559a230f71d7972d65",
    "name": "My New Group 4",
    "type": "GROUP",
    "items": []
}

Parameter Value Description
_id UUid The id of the group
name String The name of the group
type String The type of the asset created (default = GROUP)
items Array The child items of the group (default = empty)