Channel and Channel Set Assets

A channel is a collection of videos in a single player. A channel set is a collection of channels.

Note: For more information about Backlot REST API commands, see the Backlot API Reference.

Common Routes, Attributes, Properties and Query String Parameters

List Videos in Channel

[GET]/v2/assets/channel_id/lineup

Set or Replace Videos

[PUT]/v2/assets/channel_id/lineup[
   "embed_code","embed_code", ...
]

Append Video to Channel

[PUT]/v2/assets/channel_id/lineup/embed_code
[PUT]/v2/assets/channel_id/lineup/external_id

Delete Video from a Channel

[DELETE]/v2/assets/channel_id/lineup/embed_code
[DELETE]/v2/assets/channel_id/lineup/external_id

List Channels in Channel Set

[GET]/v2/assets/channel_set_id/lineup

Set or Replace Channels

[PUT]/v2/assets/channel_set_id/lineup[
   "embed_code","embed_code", ...
]

Append Channel to Channel Set

[PUT]/v2/assets/channel_set_id/lineup/embed_code
[PUT]/v2/assets/channel_set_id/lineup/external_id

Delete Channel from a Channel Set

[DELETE]/v2/assets/channel_set_id/lineup/embed_code
[DELETE]/v2/assets/channel_set_id/lineup/external_id

Examples

This example creates a channel:

[POST]/v2/assets{  
   "name":"My Channel",
   "asset_type":"channel"
}

Backlot returns a response similar to the following:

{  
   "asset_type":"channel",
   "duration":0,
   "name":"My Channel",
   "preview_image_url":null,
   "created_at":"2011-08-10T17:45:24+00:00",
   "embed_code":"dvNTVxMjrRktSlb5v",
   "time_restrictions":null,
   "updated_at":"2011-08-10T17:45:24+00:00",
   "external_id":null,
   "hosted_at":null,
   "original_file_name":null,
   "description":null,
   "status":"live"
}
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

This example adds the IzNnllMjphu2XF3 and Y1dTdvMjq9QtOMG video assets to the dvNTVxMjrRktSlb5v channel, replacing the current videos:

[PUT]/v2/assets/dvNTVxMjrRktSlb5v/lineup[  
   "IzNnllMjphu2XF3",
   "Y1dTdvMjq9QtOMG"
]

Backlot returns a response similar to the following:

[  
   "IzNnllMjphu2XF3",
   "Y1dTdvMjq9QtOMG"
]
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

This example adds the BrdXVjMjrgtupU3M video asset to the dvNTVxMjrRktSlb5v channel, without replacing the current videos:

[PUT]/v2/assets/dvNTVxMjrRktSlb5v/lineup/BrdXVjMjrgtupU3M

Backlot returns a response similar to the following:

[  
   "BrdXVjMjrgtupU3M”, 
   "IzNnllMjphu2XF3",
   "Y1dTdvMjq9QtOMG"
]
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

This example creates a channel set:

[POST]/v2/assets{  
   "name":"My Channel",
   "asset_type":"channel_set"
}

Backlot returns a response similar to the following:

{  
   "asset_type":"channel_set",
   "duration":0,
   "name":"My Channel",
   "preview_image_url":null,
   "created_at":"2011-08-10T17:45:24+00:00",
   "embed_code":"dvNTVxMjrRktSlb5v",
   "time_restrictions":null,
   "updated_at":"2011-08-10T17:45:24+00:00",
   "external_id":null,
   "hosted_at":null,
   "original_file_name":null,
   "description":null,
   "status":"live"
}
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

This example adds the IzNnllMjphu2XF3 and Y1dTdvMjq9QtOMG channels to the dvNTVxMjrRktSlb5v channel set, replacing the current channels:

[PUT]/v2/assets/dvNTVxMjrRktSlb5v/lineup[  
   "IzNnllMjphu2XF3",
   "Y1dTdvMjq9QtOMG"
]

Backlot returns a response similar to the following:

[  
   "IzNnllMjphu2XF3",
   "Y1dTdvMjq9QtOMG"
]
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

This example adds the BrdXVjMjrgtupU3M channel to the dvNTVxMjrRktSlb5v channel set, without replacing the current channels:

[PUT]/v2/assets/dvNTVxMjrRktSlb5v/lineup/BrdXVjMjrgtupU3M               

Backlot returns a response similar to the following:

[  
   "BrdXVjMjrgtupU3M",
   "IzNnllMjphu2XF3",
   "Y1dTdvMjq9QtOMG"
]
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

해당 내용이 도움 되었습니까?