Enforcing Per-Studio Limits on Concurrent Streams

The Category API allows you to group assets into categories according to the concurrent stream limits required by a studio or other content owner. A concurrent stream limit is the maximum number of unique movie titles a user can watch simultaneously. You create a category for a studio, set the limit of concurrent streams allowed by that studio, then assign specific assets to the category. Actions taken on categories do not change any of the attributes associated with the assets within the category, it only changes their categorization. Use the Backlot API to work with categories of movies. Use the Rights Locker API to set limits on the categories for a specific user. All category routes are authenicated prior to allowing access.

How Types of Limits Interact

The concurrent stream limit for a studio is a limit on the number of unique movie titles belonging to that studio (category) that a user can watch at a given time. This is different from the concurrent stream limit that you specify globally for your provider account, per viewer or per asset as described in Limiting Concurrent Streams per Viewer. The limit for a studio takes precedence over the other types of limits, but only within the other limits.

For example, suppose you have set your provider account to a global limit of 3 movies. This means none of your viewers can watch more than 3 movies at once. Then you add 2 categories, one for each studio you are working with:

  • Studio DEF - Supermovie A, Supermovie B, Supermovie C
  • Studio XYZ - Ooyala Movie 1, Ooyala Movie 2, Ooyala Movie 3

Suppose you set both studio limits at 2 titles. When the studio limit of 2 is combined with the provider limit of 3, the result is each user can watch up to 3 streams at a time, out of which only 2 titles can be from the same studio. When watching more than 2 titles, one title must be from the other studio. So, a user cannot watch Ooyala Movie 1, Ooyala Movie 2 and Ooyala Movie 3 at the same time because it would breach the studio limit of 2 titles for Studio XYZ, even though the total number of video streams is under the provider limit of 3.

A user can watch Supermovie A on 3 different streams without exceeding any limit because it is only one title. Similarly a user can watch Ooyala Movie 1, Ooyala Movie 3, plus another Ooyala Movie 3 on another stream because this does not breach the limit of 2 titles for Studio XYZ. In this case the viewer is watching only 2 titles in total, with 1 title being repeated on 2 different streams. This also does not breach your provider limit of 3 streams.

Likewise, a user can watch Supermovie A, Supermovie B and Ooyala Movie 1 at the same time because this is within your global provider limit of 3 streams and also within the limit of 2 movie titles per studio. In this case the user is watching 2 titles from Studio DEF and just 1 title from Studio XYZ.

API Server: https://api.ooyala.com

The Backlot API is used to create, retrieve and delete categories of movies for a studio.

Note: GET requests for the Backlot API are made to the server https://cdn-api.ooyala.com. Other requests are made to http://api.ooyala.com or https://api.ooyala.com.

Set Movie Categories

Create new categories of movies for a studio:

POST https://api.ooyala.com/v2/assets/asset_id/concurrent_streams_categories

Example request body:

{ 
  "categories" : [ "cat1", "cat2", "cat3" ] 
}

Any existing categories will be replaced by the provided categories. To delete the contents of all categories, send an empty array.

Upon success, the value 200 Success is returned. Upon failure, the code 404 Not Found is returned.

Get Movie Categories

Retrieve movies by category for a studio:

GET https://cdn-api.ooyala.com/v2/assets/asset_id/concurrent_streams_categories

Upon success, the response is a list of categories.

Example response:

{ 
  "categories" : [ "cat1", "cat2", "cat3" ] 
}

Upon failure, the code 404 Not Found is returned.

Delete Movie Categories

Delete a category of movies for a studio:

DELETE https://api.ooyala.com/v2/assets/asset_id/concurrent_streams_categories

Upon success, the categories being deleted are listed.

Example response:

{ 
  "categories" : [ "cat1", "cat2", "cat3" ] 
}

Upon failure, the code 404 Not Found is returned.

Set Limits on Categories

Set a limit on the number of movie categories for your account for a studio:

POST https://api.ooyala.com/v2/concurrent_streams_categories

Example request body:

{ 
  "cat1" : 1, 
  "cat2" : 5,
  "cat3" : 8
}

Example response:

{ 
  "cat1" : 1, 
  "cat2" : 5,
  "cat3" : 8
}

Upon success, each existing category listed is replaced by its corresponding category. To edit a subset of limits use a PATCH route. To delete all limits use a DELETE route.

Edit Limits on Categories

Edit the limits for the provided categories. Any other categories will remain unchanged.

PATCH https://api.ooyala.com/v2/concurrent_streams_categories

Example request body:

{ 
  "cat1" : 3, 
  "cat3" : 2
}

Example response:

{ 
  "cat1" : 3, 
  "cat3" : 2
}

Get Limits on Categories

Get concurrent stream limit for each category at the provider level:

GET https://cdn-api.ooyala.com/v2/concurrent_streams_categories

Example response:

{ 
  "cat1" : 3, 
  "cat3" : 2
}

Delete Limits on Categories

To delete all limits on all categories:

DELETE https://api.ooyala.com/v2/concurrent_streams_categories

Example response:

{ 
  "cat1" : 3, 
  "cat3" : 2
}

API Server: https://rl.ooyala.com

The Rights Locker API is used to set limits on categories for specific users.

Note: GET requests for the Rights Locker API are made to the server https://cdn-api.ooyala.com. Other requests for the Rights Locker API must be made to the server https://rl.ooyala.com, not http://api.ooyala.com or https://api.ooyala.com.

Set Category Limits for a User

Replace existing categories with the provided categories for a specific user:

POST https://rl.ooyala.com/concurrent_streams_categories/pcode/pcode/account_id/account_id

Example request body:

{ 
  "cat1" : 3, 
  "cat2" : 2,
  "cat3" : 5
}

To edit a subset of the limits use the PATCH route. To delete all limits use the DELETE route.

Example response:

{ 
  "cat1" : 3,
  "cat2" : 2,
  "cat3" : 5
}

Edit Category Limits for a User

Update the limits for existing categories for a specific user. Any other categories remain unchanged.

PATCH https://rl.ooyala.com/concurrent_streams_categories/pcode/pcode/account_id/account_id

Example request body:

{ 
  "cat1" : 3,
  "cat2" : 2,
  "cat3" : 5
}

Get Category Limits for a User

Retrieve the list of limits for every category associated with a specific user:

GET https://cdn-api.ooyala.com/concurrent_streams_categories/pcode/pcode/account_id/account_id

Example body:

{ 
  "cat1" : 3, 
  "cat2" : 2,
  "cat3" : 5
}

Example response:

{ 
  "cat1" : 3, 
  "cat2" : 2,
  "cat3" : 5
}

Delete Category Limits for a User

Delete the limits for every category for a specific user:

DELETE https://rl.ooyala.com/concurrent_streams_categories/pcode/pcode/account_id/account_id

Example response:

{ 
  "cat1" : 3, 
  "cat2" : 2,
  "cat3" : 5
}

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