Featured videos on channel page
Get list of featured videos
Returns data of featured videos listed on the channel page.
GET https://api.video.ibm.com/channels/{channel_id}/featured-videos.json
Parameters
The query parameters for the GET request:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
page | integer | OPTIONAL | Requested page number (value is 1 by default) |
pagesize | integer | OPTIONAL | Requested page size (value is 50 by default, max. 50) |
detail_level | string | OPTIONAL | Verbosity 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 set of key-value pairs is returned under a videos element.
KEY | TYPE | DESCRIPTION |
---|---|---|
id | string | Unique ID of the video |
title | string | Video title |
description | string | Video description |
url | string | Video URL |
length | string | Video length in seconds |
created_at | number | The 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_at | number | The date and time when the video was added (uploaded or recorded) to IBM Video Streaming (Unix timestamp) |
file_size | string | Video file size in bytes |
views | number | Number views on the video |
thumbnail | object | A 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_urls | object | (This field is being deprecated.) |
links | object | Contains 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed | |
403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
404 Not Found | not_found | This error code is returned in the following cases: The channel does not exist; The featured videos on the channel are not shown |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |
Update featured videos
You can adjust what videos are designated as featured on a channel.
PUT https://api.video.ibm.com/channels/{channel_id}/featured-videos.json
Parameters
The parameters for the PUT request:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
video_ids | array | REQUIRED | Video IDs to be added to the channel featured videos. |
Example:
POST /channels/{channel_id}/featured-videos.json HTTP/1.1Host: api.video.ibm.comAuthorization: Bearer 3c2573673b782f6544405a22636f3d5d3b6f3950Content-Type: application/x-www-form-urlencodedvideo_ids[]=111&video_ids[]=222
The token in the request above is only an example.
Success response
The response will contain the following collection limit headers:
HEADER | TYPE | DESCRIPTION |
---|---|---|
X-Collection-Limit | string | The maximum number of videos that can be featured on a channel |
X-Collection-Remaining | number | How many more videos can be featured on the channel |
Error responses
Possible error responses:
HTTP RESPONSE CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed | |
403 Forbidden | lack_of_ownership | The API user is not allowed to manage the given channel |
404 Not Found | not_found | Channel not found |
413 Request Entity Too Large | limit_reached | The number of videos in the featured videos list have reached the limit. Check the returned collection limit headers |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |