Use this endpoint to list all playlists under your site.
apiv2/playlists/list/<PARTNER_ID>/<SEARCH_TERM>.json
This method is type of GET but will receive POST parameters as well.
PARTNER_ID is an integer ID of your web property/site in Brid CMS.
SEARCH_TERM is a an optional string parameter which represents a search term or a playlist ID.
Parameters:
Name | Type | Description |
---|---|---|
partner_id *required | integer | Integer site id |
pagination | string | Accepted values: page:X where X is the pagination number |
data[Playlist][search] | string | Accepted values: "some playlist title", "12345" |
<?php
require_once('lib/BridApi.php');
try {
$api = new BridApi(array('auth_token'=>'b1437c94847d7e19268ad3bda0e46f8f6bc36f45'));
$return = $api->get(['playlists', 'list', 13085]);
print_r($return);
}
catch(Exception $e) {
echo $e->getMessage();
}
?>
<?php
require_once('lib/BridApi.php');
try {
$api = new BridApi(array('auth_token'=>'b1437c94847d7e19268ad3bda0e46f8f6bc36f45'));
$return = $api->get(['playlists', 'list', 123456, 'data[Playlist][search]:my playlist name]');
print_r($return);
}
catch(Exception $e) {
echo $e->getMessage();
}
?>
BridApi.php is a small library we provide in our git repository which allows you to quick-start your implementation so we advise you to use it. These examples are made with this library in mind. Make sure to substitute and use your own authorization token and Partner ID when trying out these examples.