On This Page

Dynamic Ingest API Sample: Add Scheduled Videos (Dynamic Delivery)

In this sample, you will learn how to schedule videos to become available at some future time, so that they aren't accidentally played before they should be.

Note that this sample is for accounts using the Dynamic Delivery system. If your account uses the legacy ingest system, see this version instead.

Overview

When you add a new video to your account, you may not wish to release the video for viewing until some time in the future. The video is potentially playable, however, as soon as a playable rendition is created. In addition to someone publishing
the video by mistake, it might show up in a smart playlist because it matches the search criteria that selects the videos for the list.

The best way to prevent accidental pre-mature release is to schedule the video for when you want it to become available at the time you ingest it. You can do this simply by including a schedule object in the request body for the
CMS API call that creates the video:

The starts_at and ends_at values can be full ISO 8601 date-time stamps, or you can just include the date part, as shown here. Both fields are optional: omitting the starts_at field means the video will be
available immediately; omitting the ends_at field means that the video will be available indefinitely.

Getting Credentials

To get a client_id and client_secret, you will need to go to the OAuth UI and register this app:

Proxy code

In order to build your own version the sample app on this page, you must create and host your own proxy. (The proxies used by Brightcove Learning Services only accept requests from Brightcove domains.) A sample proxy, very similar to the one we
use, but without the checks that block requests from non-Brightcove domains, can be found in this GitHub respository. You will also find basic instructions for using it there,
and a more elaborate guide to building apps around the proxy in Using the REST APIs.