Discovery Queue (Deprecated)

Important: The Queue API is disabled. Contact your Ooyala representative for information about alternative options.

A Discovery Queue is a list of assets, each with expiration date, position of playback (playhead, or position of last play), and other information. A queue belongs to a particular viewer, who is the only person who can view it or manipulate it. You do not need to create the queue. You only need to add or delete items from it.

A viewer can add any asset to his queue. The item stays in the queue until one of the following conditions is met:
  • The associated asset itself is deleted or the associated live event concludes and has no "reruns" (VOD versions of the live stream).
  • The asset is viewed in its entirety.

Add an asset to a viewer's queue

[PUT]/v2/discover/queue/[asset|live_asset]/asset_id{
   "expires_at" : "dateTimeInISO8601-UTCformat"
}

View a queue

[GET]/v2/discover/queue

Delete an item from a queue

[DELETE]/v2/discover/queue/[asset|live_asset]/asset_id

Route Attributes

The following table describes all attributes that can be expressed through the route.

Route Attribute Description
[assets|live_assets] The type of asset being added to a queue

Type: String

Default: None

Example: [PUT] /v2/discover/queue/viewers/54321/asset/2162e39c331d407d9176895f34e36af8

asset_id Asset ID (embed code, or content ID). You can add (PUT) an asset to a viewer's queue only if you are the owner (provider) of it.

Type: String

Default: None

Example: pxcm9lMzpfyOKKtj1LiplPwn3eqm67dM

Query String Parameters

The following table describes all parameters of the query string.

Parameter Description Required?
order_by

The field to sort on.

Type: String

Default: none

Valid Values: expires_at[-desc|-asc] | added_at[-desc|-asc] | now_playing | last_watched_at[-desc|-asc] where desc and asc are descending or ascending sort order.

Examples: [GET] /v2/discover/queue/viewers/091iut98ycbkdwp9y8fwjhk?orderby=expires_at-asc

No

Properties

The following table describes all properties that can be associated with a queue.

Property Description Required?
expires_at

Expiration date/time of asset in ISO-8601/UTC format

Type: dateTime

Default: no expiration

Example: "2014-04-15T21:00Z"

No

Examples

This example adds the asset 2162e39c331d407d9176895f34e36af8 to the queue associated with viewer 54321, with an optional expiration date/time.
[PUT]/v2/discover/queue/viewers/54321/assets/54321/2162e39c331d407d9176895f34e36af8{  
   "expires_at":"2013-08-15T21:00Z",
}

Backlot returns a response similar to the following:

{  
   "added_at":1363617641
}
This example retrieves the queue for viewer 091iut98ycbkdwp9y8fwjhk.
[GET]/v2/discover/queue/viewers/091iut98ycbkdwp9y8fwjhk

Backlot returns a response similar to the following:

[  
   "RsYmduMjpNE3RGHOTa6Chm-YoxArCqiw",
   "ZoYmduMjpBbLj3QerkWScewtpPnvmOi2",
   "pxcm9lMzpfyODDtj1LiplPwnxmqm5JdM"
]
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.

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