VL Group

Rhymba v3.6 Documentation

Introduction

The Playlist Server is an API that allows you to create playlists using any VL Group media. You can allow your customers to edit them directly, or curate them yourself. Dispatch supports streaming the list by providing the Playlist ID, and the Playlist Server itself supports radio style tracking, to allow multiple users to listen to the same media at the same time, like a radio station.

The server can be used to manage external ids as well, though our system always assumes you are using our ids. As such, it will attemp to populate meta data for ids it recognizes, and any service that is dependent on accurate meta data (such as Radio Play and DMCA Compliance) are incompatible with external ids.

Authentication

To access the Playlist API, you will be issued a Private and Public Key, in addition to the Access Token and Access Secret you use to access the Rhymba API.

All requests must be hashed using the Private Key, and included in a header named hash.
All requests must contain system_access_token and system_access_secret headers.
All requests to Playlist endpoints that make alterations (post, put, delete) must contain a valid access_token.

The hash is created by combining the method or http verb (get, post, etc) with the route and actual data values (query string or post body) using HMAC SHA256 and your Private Key.

Javascript Example


var hash = CryptoJS.HmacSHA256(Method + '&' + Route + Values, private_key);
var hash64 = CryptoJS.enc.Base64.stringify(hash);

C# Example

var keyBytes = System.Text.Encoding.UTF8.GetBytes(private_key);
var dataBytes = System.Text.Encoding.UTF8.GetBytes(Method + "&" + Route);
var hmac = new HMACSHA256(keyBytes);
var hmacBytes = hmac.ComputeHash(dataBytes);
var hash = Convert.ToBase64String(hmacBytes);

JSON Return Format

All requests return a JSON object in the following format. Requested data will be returned in the data field, with the appropriate type.

bool success
string message
type data
int statusCode
int Page
int PageCount

Playlist Endpoints

All Playlist endpoints are named after the object they reference, and are always plural. The action performed depends on the http verb used; get, post, put or delete.