Skip to content

Playlist API

This API provides the ability to create, read, update and delete a users own playlists. The service will auto detect who the user is by reading the access token and sub profile token in the request.

📘 Note

If you want to use the service without sub profiles, simply omit the X-Vimond-Subprofile header in the CURLs below. If no sub profile is set, the API will log all actions with the default sub profile.

Creates a playlist for the specified user and profile.

curl -X POST \
"https://{tenant}.playlist.{domain}\
/api/v1/playlists" \
-H "accept: application/json" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}" \
-H "Content-Type: application/json" \
-d '{ "name": "My Playlist", "assetIds": ["56789", "98765"]}'
Response CodeDescription
201 CreatedPlaylist created
401 UnauthorizedUser was unauthorized
422 Unprocessable EntityPlaylist in body was malformed
{
"data": [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "Name of the playlist",
"assetIds": ["asset1", "asset2", "and so on"],
}
]
}

Fetches all playlists for the user.

curl -X GET \
"https://{tenant}.playlist.{domain}\
/api/v1/playlists" \
-H "accept: application/json" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}"
Response CodeDescription
200 OkPlaylists retrieved successfully
401 UnauthorizedUser was unauthorized
{
"data": [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "Fabrica de la moneda y timbre : camera recording",
"assetIds": ["asset1", "asset2", "and so on"],
"uri": "URI of the playlist"
}
]
}

Returns the specified playlist

curl -X GET \
"https://{tenant}.playlist.{domain}\
/api/v1/playlists/{playlistId}" \
-H "accept: application/json" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}"
Response CodeDescription
201 OkPlaylist retrieved successfully
401 UnauthorizedUser was unauthorized
404 Not FoundPlaylist not found
{
"data": [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "Name of the playlist",
"assetIds": ["asset1", "asset2", "and so on"],
"uri": "URI of the playlist"
}
]
}

A single playlist can be fetched by appending /name/<playlist_name> to the above request. The response codes and structure are the same.

curl -X GET \
"https://{tenant}.playlist.{domain}\
/api/v1/playlists/name/{playlistName}" \
-H "accept: application/json" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}"

Sends the updated playlist in the body to update name or list of assets.

curl -X PUT \
"https://{tenant}.playlist.{domain}\
/api/v1/playlists/{playlistId}" \
-H "accept: application/json" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}" \
-H "Content-Type: application/json" \
-d '{ "name": "My New Playlist", "assetIds": ["56789", "98765"]}'
Response CodeDescription
200 OkPlaylist updated successfully
401 UnauthorizedUser was unauthorized
404 Not FoundPlaylist does not exist
422 Unprocessable EntityPlaylist in body was malformed
{
"data": [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "Name of the playlist",
"assetIds": ["asset1", "asset2", "and so on"],
"uri": "URI of the playlist"
}
]
}

Adds the asset specified in the path to the playlist.

curl -X POST \
"https://{tenant}.playlist.{domain}/api/v1\
/playlists/{playlistId}/assets/{assetId}" \
-H "accept: application/json" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}"
Response CodeDescription
200 OkAsset added
401 UnauthorizedUser was unauthorized
404 Not FoundPlaylist does not exist
{
"data": [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "Name of the playlist",
"assetIds": ["asset1", "asset2", "and so on"],
"uri": "URI of the playlist"
}
]
}

Removes the asset specified in the path from the playlist.

curl -X DELETE \
"https://{tenant}.playlist.{domain}/api/v1\
/playlists/{playlistId}/assets/{assetId}" \
-H "accept: application/json" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}"
Response CodeDescription
200 OkAsset removed
401 UnauthorizedUser was unauthorized
404 Not FoundPlaylist does not exist
{
"data": [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "Name of the playlist",
"assetIds": ["asset1", "asset2", "and so on"],
"uri": "URI of the playlist"
}
]
}
curl -X DELETE \
"https://{tenant}.playlist.{domain}/api/v1\
/playlists" \
-H "accept: */*" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}"
Response CodeDescription
204 No ContentPlaylists deleted
401 UnauthorizedUser was unauthorized
curl -X DELETE \
"https://{tenant}.playlist.{domain}\
/api/v1/playlists/{playlistId}" \
-H "accept: */*" \
-H "Authorization: Bearer {JWToken}" \
-H "X-Vimond-Subprofile: {subprofileToken}"
Response CodeDescription
204 No ContentPlaylist deleted
401 UnauthorizedUser was unauthorized