Adding Videos to a Channel (Deprecated)

After you create a channel, you can start adding videos.

You must have the same player assigned to all the videos on the channel, so the channel can play them as expected.
Note: Channels and channel sets have been deprecated and are scheduled to be disabled. For details and alternatives, see the OVP Release Notes.
Note: For more information about Backlot REST API commands, see the Backlot API Reference.
Note: You cannot add channels to a channel. To create collections of channels, use channel sets.

To add videos to a channel:

  1. To view videos currently assigned to a channel, use GET /v2/assets, the asset ID, and the /lineup qualifier. The following example lists the videos for the dvNTVxMjrRktSlb5v channel.
    [GET]/v2/assets/dvNTVxMjrRktSlb5v/lineup

    Backlot returns a response similar to the following.

    [
       "Argh3lMjphu25tH",
       "RQlbdvMjq9QtGGG" 
    ]
    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.

  2. To replace the current set of videos with a new set, use PUT with the /v2/assets route, the asset ID of the channel, the /lineup and the asset IDs of videos in the request body. The following 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.

  3. To append a single video to a channel without replacing the current set, use PUT /v2/assets with the asset ID of the channel, the /lineup qualifier, and the asset ID of the video to add. The following example adds the BrdXVjMjrgtupU3M video asset to the dvNTVxMjrRktSlb5v channel.
    [PUT]/v2/assets/dvNTVxMjrRktSlb5v/lineup/BrdXVjMjrgtupU3M

    Backlot returns a response similar to the following.

    [
       "BrdXVjMjrgtupU3M",
       "IzNnllMjphu2XF3",
       "Y1dTdvMjq9QtOMG" 
    ]

    Sorting Try it

  4. To remove a video from a channel, use DELETE /v2/assets with the asset ID of the channel, the /lineup qualifier, and the asset ID of the video to remove. The following example deletes the BrdXVjMjrgtupU3M video asset from the dvNTVxMjrRktSlb5v channel.
    [DELETE]/v2/assets/dvNTVxMjrRktSlb5v/lineup/BrdXVjMjrgtupU3M

    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.

The videos within the channel are successfully updated.

Was this article helpful?