Managing Playlists
This series of API calls allows you to create, edit, delete and fetch all playlists within a Rev account.
Create a Playlist
POST
/api/v2/playlists
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | playlist name, must be unique | Yes |
| videoIds | string | IDs of the videos to add to playlist. At least one video is required. | Yes, one |
Example Request
{
{
"playlistId": "string"
}
}
Response Codes
| Code | Description |
|---|---|
| 400 | Bad request |
| 401 | Unauthorized error |
| 500 | Internal server error |
Edit a Playlist
PUT
/api/v2/playlists/{playlistId}
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | ID of playlist to edit. | Yes |
| editPlaylistMembers | body | Video IDs to edit in the playlist and the action taken (add or remove). | Yes |
Example Request
[
{
"videoId": "string",
"action": "Add"
}
]
Response Codes
| Code | Description |
|---|---|
| 200 | Ok |
| 400 | Bad request |
| 401 | Unauthorized error |
| 500 | Internal server error |
List All Playlists
GET
/api/v2/playlists
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| none |
Example Response
{
"featuredPlaylist": {
"featurePlaylistId": "string",
"playbackUrl": "string",
"Videos": {
"videoId": "string",
"videoTitle": "string"
}
},
"Playlists": {
"playlistId": "string",
"playlistName": "string",
"playbackUrl": "string",
"Videos": {
"videoId": "string",
"videoTitle": "string"
}
}
}
Response Codes
| Code | Description |
|---|---|
| 401 | Unauthorized error |
| 500 | Internal server error |
Delete a Playlist
DELETE
/api/v2/playlists/{playlistId}
Request Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| Id | path | Id of playlist to delete. | Yes |
Response Codes
| Code | Description |
|---|---|
| 200 | Ok |
| 401 | Unauthorized error |
| 500 | Internal server error |
- Create
-
Create a Playlist
POST/api/v2/playlistsRequest Parameters
Name Type Description Required name string playlist name, must be unique Yes videoIds string IDs of the videos to add to playlist. At least one video is required. Yes, one Example Request
{ { "playlistId": "string" } }Response Codes
Code Description 400 Bad request 401 Unauthorized error 500 Internal server error - Edit
-
Edit a Playlist
PUT/api/v2/playlists/{playlistId}Request Parameters
Name Type Description Required id string ID of playlist to edit. Yes editPlaylistMembers body Video IDs to edit in the playlist and the action taken (add or remove). Yes Example Request
[ { "videoId": "string", "action": "Add" } ]Response Codes
Code Description 200 Ok 400 Bad request 401 Unauthorized error 500 Internal server error - List
-
List All Playlists
GET/api/v2/playlistsRequest Parameters
Name Type Description Required none Example Response
{ "featuredPlaylist": { "featurePlaylistId": "string", "playbackUrl": "string", "Videos": { "videoId": "string", "videoTitle": "string" } }, "Playlists": { "playlistId": "string", "playlistName": "string", "playbackUrl": "string", "Videos": { "videoId": "string", "videoTitle": "string" } } }Response Codes
Code Description 401 Unauthorized error 500 Internal server error - Delete
-
Delete a Playlist
DELETE/api/v2/playlists/{playlistId}Request Parameters
Name Type Description Required Id path Id of playlist to delete. Yes Response Codes
Code Description 200 Ok 401 Unauthorized error 500 Internal server error