This collection works with playlists

Collection /playlist

Work with individual playlists

GET /playlist/:id

Get the json contents of an individual playlist

item value
Access guest
Full url https://api.buto.tv/v2/playlist/{playlist_id}
verb GET
params string:playlist_id

Example usage

#get video details
curl -u API_KEY:x --include https://api.buto.tv/v2/playlist/2xqWG

returns

HTTP/1.1 200 OK
...
Content-Type: application/json

{
    "playlist_id": "2xqWG",
    "playlist_type": "standard",
    "title": "My playlist",
    "description": "Example playlist",
    "monetization_url": "",
    "randomise": "0",
    "video_limit": "0",
    "open_in_playlist_view": "0",
    "created_by_user_id": "zyFXG",
    "organisation_id": "Bbgwg",
    "settings": "",
    "security": {
        "is_ip_restricted": false
    },
    "videos": [
        {
            "video_id": 12345
            ...
        }
    ],
    "monetization": {}
}


PUT /playlist/:id

Update the playlist's details using a json object

item value
Access user
Full url https://api.buto.tv/v2/playlist/{playlist_id}/?data={$data}
verb PUT
params string:playlist_id string:data

Example usage

#get video details
curl -u API_KEY:x --include https://api.buto.tv/v2/playlist/12345/?data={"monetization_id":232435}

returns

HTTP/1.1 200 OK
...
Content-Type: application/json

{
    "status": true
}


POST /playlist/create/:organisation_id

Create a new empty playlist.
We had to put the extra create word in as our framework isn't too clever with REST routes and HTTP verb detection

item value
Access user
Full url https://api.buto.tv/v2/playlist/create/:organisation_id
verb PUT
params string:organisation_id string:title:OPTIONAL string:description:OPTIONAL

Example usage

#get video details
curl -u API_KEY:x --include --request POST https://api.buto.tv/v2/playlist/create/Bbgwg

returns

HTTP/1.1 200 OK
...
Content-Type: application/json

{"playlist_id": "kDWWq"}

PUT /playlist/:playlist_id/add/video/:video_id

Add an existing video to an existing playlist. By default the video will be added to the end of the playlist. You can add the same video to a playlist multiple times.
NB you can only have a maximum of 25 videos in your playlists.

item value
Access user
Full url https://api.buto.tv/v2/playlist/{playlist_id}/add/{video_id}
verb PUT
params string:playlist_id string:video_id

Example usage

#get video details
curl -u API_KEY:x --include --request PUT https://api.buto.tv/v2/playlist/ctsBR/add/video/75nPm

returns

HTTP/1.1 200 OK
...
Content-Type: application/json

{"status":{"added":"75nPm"},"videos":{"order":["75nPm","12345"],"count":2}} 

DELETE /playlist/:playlist_id/remove/video/:video_id

Remove an existing video from a playlist
We had to put the extra remove word in as our framework isn't too clever with REST routes and HTTP verb detection

item value
Access user
Full url https://api.buto.tv/v2/playlist/{playlist_id}/remove/{video_id}
verb PUT
params string:playlist_id string:video_id

Example usage

#get video details
curl -u API_KEY:x --include --request DELETE https://api.buto.tv/v2/playlist/ctsBR/remove/video/75nPm

returns

HTTP/1.1 200 OK
...
Content-Type: application/json

{"status":{"tried_to_remove":"75nPm"},"videos":{"order":["75nPm"],"count":1}} 

Collection /playlist/organisation

Playlists per organisation

GET /playlist/organisation/:id

Get all the playlists belonging to an organisation

item value
Access user
Full url https://api.buto.tv/v2/playlist/organisation/{organisation_id}
verb GET
params string:organisation_id

Collection /playlist/rss

RSS feed for a playlist

GET /playlist/rss/:id

Get an RSS feed for a particular playlist

item value
Access user
Full url https://api.buto.tv/v2/playlist/rss/{playlist_id}
verb GET
params string:playlist_id

This collection works with playlists