Skip to main contentIBM Video Streaming Developers

Manage Content of Playlist

List the videos of a playlist

Returns data on the videos inside a specific playlist.

GET https://api.video.ibm.com/playlists/{playlist_id}/videos.json

Parameters

The parameters for the GET request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
pageintegerOPTIONALRequested page number (value is 1 by default)
pagesizeintegerOPTIONALRequested page size (value is 200 by default, max. 200)
detail_levelstringOPTIONALVerbosity level. Possible value: minimal In case of minimal verbosity level, the result set is limited to id and links data. If the channel is protected (see Security section), only minimal data can be retrieved without a valid access token.

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value pairs under a videos element.

KEYTYPEDESCRIPTION
idstringUnique ID of the video
titlestringVideo title
descriptionstringVideo description
urlstringVideo URL
lengthstringVideo length in seconds
created_atnumberThe date and time when the video was created (Unix timestamp). By default, it has the same value as the added_at field, but it can be edited by channel admins to better reflect the real content creation date and time for the viewers.
added_atnumberThe date and time when the video was added (uploaded or recorded) to IBM Video Streaming (Unix timestamp)
file_sizestringVideo file size in bytes
viewsnumberNumber views on the video
thumbnailobjectA set of key-value pairs containing URLs of the thumbnail images. Attributes: default and various image sizes (e.g. image_112x63, … , image_320x180, image_640x360, image_1920x1080)
media_urlsobject(This field is being deprecated.)
linksobjectContains information about the channel of the video

Example of a success response:

{
"videos": [
{
"id": "111",
"title": "Title of video",
"description": "Description of video",
"url": "http://www.ustream.tv/recorded/111",
"length": "12345.123456",
"created_at": 1399388736,

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenIf the playlist does not belong to a channel then the request must include a valid access token.
403 Permission deniedpermission_deniedIf the playlist does not belong to a channel then the authenticated user needs access to the playlist.
404 Not Foundnot_foundThe playlist does not exist or in case of a channel playlist the playlists on the channel page are not shown.
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Add video to a playlist

Add a video to an existing playlist on the channel.

PUT https://api.video.ibm.com/playlists/{playlist_id}/videos/{video_id}.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned. The response will contain the following collection limit headers:

HEADERTYPEDESCRIPTION
X-Collection-LimitintegerThe maximum number of videos that can be added to a playlist
X-Collection-RemainingintegerHow many more videos can be added to the playlist

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given playlist or video.
404 Not Foundnot_foundPlaylist was not found
413 Request Entity Too Largelimit_reachedThe number of videos in the playlist has reached the limit. Check the returned collection limit headers.
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Get details of a video in a playlist

Returns data on the videos in a specific playlist.

GET https://api.video.ibm.com/playlists/{playlist_id}/videos/{video_id}.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value pairs under a video element.

KEYTYPEDESCRIPTION
idstringUnique ID of the video
titlestringVideo title
number_of_thumbnailsnumber
picture_revisionnumberThe revision of the thumbnail picture
channel_idstringUnique ID of the channel
viewsnumberNumber of views
thumbnailstring
created_atnumberThe date and time when the video was created (Unix timestamp) By default, it has the same value as the added_at field, but it can be edited by channel admins to better reflect the real content creation date and time for the viewers.
added_atnumberThe date and time when the video was added (uploaded or recorded) to IBM Video Streaming (Unix timestamp)
urlstringVideo URL
typestring
ordernumberThe position of the video in the playlist
descriptionstringVideo description
chaptersarray
lengthstringVideo length in seconds

Example of a success response:

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundThis error code is returned in the following cases: The playlist does not exist In case of channel playlist, the channel does not exists or the playlists on the channel page are not enabled The given video is not in the playlist
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Reposition a video in a playlist

Change the position of a video in a playlist.

PUT https://api.video.ibm.com/playlists/{playlist_id}/videos/{video_id}/position.json

Parameters

The parameters for the PUT request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
positionintegerREQUIREDThe new position of the video in the playlist.

Success response

Upon success a response with HTTP status “200 OK” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestbad_requestThe position parameter is either missing or out of range
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundThe playlist does not exist or the video is not on the playlist
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Remove a video from a playlist

Removes video from an already created playlist. Note that this does not delete the video from the channel or account.

DELETE https://api.video.ibm.com/playlists/{playlist_id}/videos/{video_id}/position.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned.

The response will contain the following collection limit headers:

HEADERTYPEDESCRIPTION
X-Collection-LimitintegerThe maximum number of videos that can be added to a playlist
X-Collection-RemainingintegerHow many more videos can be added to the playlist

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundThe playlist does not exist or the video is not on the playlist
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request