Publishing Rules

Publishing rules specify when and where your content can be played. With publishing rules, you can restrict your content to specific geographic regions, ensure that it is only embedded on specific domains, and only allow it to be viewed at specific times.

When your asset is loaded, it checks its publishing rule before playing. Each rule that you
create can contain any combination of these restrictions and can be assigned to multiple
videos or channels.

Note: Within the Backlot UI, publishing rules are called syndication groups.

Add New Publishing Rule

[POST] /v2/publishing_rules
{
     properties
}
   

List Publishing Rules

[GET] /v2/publishing_rules
   

Get Publishing Rule

[GET] /v2/publishing_rules/publishing_rule_id
   

Modify Publishing Rule

[PATCH] /v2/publishing_rules/publishing_rule_id
{
     properties
}
   

Delete Publishing Rule

[DELETE] /v2/publishing_rules/publishing_rule_id
   

Route Attributes

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

Route Attribute Description
publishing_rule_id

The ID of the publishing rule. To get a list of publishing rules, perform a get against the /publishing_rules route.

Type: String

Default: None

Example: /publishing_rules/ru1ze4ea4e648fd07d4509123254

Properties

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

Property Description Required?
all_day

Specifies whether the content can be played all day.

Type: Boolean

Valid Values: true | false

Conditions: Required if type is set to "recurring" and start_time and end_time are not specified.

Example: true

Parent: time_restrictions

Conditional
allowed_devices

Specifies allowed devices.

Type: Array

Valid Values: iphone | ipad | android | blackberry

Default: All devices are allowed

Example: ["iphone", "ipad" ]

No
anonymizer_statuses

Specifies what anonymizer statuses to block.

Type: String

Valid Values: private | active | suspect | inactive

Conditions: Required if proxy_restrictions are specified.

Example: "private", "active"

Parent: proxy_restrictions

Conditional
anonymizer_statuses

Specifies the anonymizer statuses to block.

Type: Array of strings

Valid Values: private | active | suspect | inactive

Ooyala uses Neustar's IP Intelligence service to identify anonymizing proxies.
Neustar assigns the following statuses to IP addresses that have been detected as
a proxy:
  • private: IP addresses with this designation allegedly contain
    anonymous proxies that are not publicly accessible. As such, they cannot be
    routinely tested with automated tools. These addresses usually belong to
    commercial ventures that sell anonymity services to the public. Addresses with
    this designation are derived from ownership information or obtained from
    trusted, high-confidence sources.
  • active: The anonymizer tested positive within the last six
    months.
  • suspect: The anonymizer tested positive within the last two years,
    but not the last six months.
  • inactive: The anonymizer gave no positive test results within the
    last two years.

Conditions: Required if proxy_restrictions are specified.

Example: ["private","suspect"]

Parent: proxy_restrictions

Conditional
dmas Array that specifies one or more DMA location codes to whitelist or blacklist.

Type: String

Valid Values: See DMA Codes.

Conditions: This property is optional and can only be specified if geographic_restrictions are specified.

Example:

["807", "501"]

Parent: geographic_restrictions

No
domain_restrictions

Specifies domain restrictions.
Type: Container

 
domains

Specifies one or more domains to whitelist or blacklist.

Type: Array of Strings

Conditions: Required if domain_restrictions are specified.

Example: ["example.com", "myotherdomain.com"]

Parent: domain_restrictions

Conditional
enabled Enables or disbles the requirement for the Ooyala Playback Token

Type:
String

Valid Values true |
false

Example:

"secure_playback_token": {
                  "enabled": "true"
                  }
                

Parent:
secure_playback_token

No
end_date

Specifies the end of the time restriction.

Type: DateTime

Valid Values: DateTime | null

Conditions: Required if time_restrictions are specified.

Example: "2010-01-01T00:00:00Z"

Parent: time_restrictions

Conditional
end_time

Specifies the end time when the content can be played.

Type: Time

Conditions: Required if type is set to "recurring" and all_day is not specified or set to false.

Example: "23:59:59"

Parent: time_restrictions

Conditional
expiration Time in seconds before the Ooyala Playback Token expires

Type:
Integer

Parent: secure_playback_token

 
geographic_restrictions

Specifies geographic restrictions.
Type: Container

 
ips Array that specifies one or more IP address/ranges to whitelist or blacklist.

Type: String

Valid Values: IPv4 addresses or ranges (see example)

Conditions: This property is optional and can only be specified if geographic_restrictions are specified.

Example:

["162.2.2.201", "162.2.2.0-162.2.2.255"]

Parent: geographic_restrictions

No
locations

Array that specifies one or more two-letter location codes to whitelist or blacklist.

Type: String

Valid Values: See Country and Location Codes.

Conditions: Required if geographic_restrictions are specified.

Example: ["US", "EU"]

Parent: geographic_restrictions

Conditional
name

Specifies the name of the publishing rule.

Type: String

Example: "My Rule"

Yes
proxy_restrictions Specifies proxy control restrictions. Type: Container  
proxy_restrictions

Specifies the type of anonymizing proxies to block. Type: Container

 
recurring_days

Specifies valid days.

Type: Array of Strings

Valid Values: "MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN"

Conditions: Required if type is set to "recurring".

Example: ["MON", "WED", "FRI"]

Parent: time_restrictions

Conditional
require_user_entitlement Require user to have been entitled to access assets, or not. Enables Rights
Locker.

Type: String

Valid Values: true |
false

Example:

"secure_playback_token": {
                  "require_user_entitlement": "true"
                  }
                

Parent:
secure_playback_token

No
restrict_concurrent_streams Enforce limit on number of concurrent streams, or not. Enables player
Authorization API.

Type: String

Valid Values: true |
false

Example:

"secure_playback_token": {
                  "restrict_concurrent_streams": "true"
                  }
                

Parent:
secure_playback_token

No
secure_playback_token Properties related to requiring or not requiring user authorization for
playback via the Ooyala Player Token

Type: Container

No
start_date

Specifies the start of the time restriction.

Type: DateTime

Valid Values: DateTime | null

Conditions: Required if time_restrictions are specified.

Example: "2010-01-01T00:00:00Z"

Parent: time_restrictions

Conditional
start_time

Specifies the start time when the content can be played.

Type: Time

Conditions: Required if type is set to "recurring" and all_day is not specified or set to false.

Example: "20:00:00"

Parent: time_restrictions

Conditional
time_restrictions Specifies time restrictions. Type: Container  
type

Specifies whether the locations are whitelisted or blacklisted.

Type: String

Valid Values: whitelist | blacklist

Conditions: Required if geographic_restrictions are specified.

Example: "whitelist"

Parent: geographic_restrictions

Conditional
type

Specifies whether the domains are whitelisted or blacklisted.

Type: String

Valid Values: whitelist | blacklist

Conditions: Required if domain_restrictions are specified.

Example: "whitelist"

Parent: domain_restrictions

Conditional
type

Specifies whether the time restriction is a recurring or one-time restriction.

Type: String

Valid Values: range | recurring

Conditions: Required if time_restrictions are specified.

Example: "range"

Parent: time_restrictions

Conditional

Examples

This example creates a basic publishing rule with no restrictions:

 [POST] /v2/publishing_rules
{
  "name": "My Basic Publishing Rule"
}
    

Backlot returns a response similar to the following:

{
  "name": "My Basic Publishing Rule",
  "allowed_devices": [
    "iphone",
    "ipad",
    "android",
   "blackberry"
  ],
  "time_restrictions": {
    "start_date": null,
    "type": "range",
    "end_date": null
  },
  "domain_restrictions": {
    "domains": [

    ],
    "type": "blacklist"
  },
  "geographic_restrictions": {
    "type": "blacklist",
    "locations": [

    ]
  },
  "id": "9b70a34a678346b185f9b81c7a291d8b"
}
    

Sorting Try it

This example modifies a publishing rule to only allow the content to be embedded on
mywebsite.com and only be viewed in the US or EU:

[POST] /v2/publishing_rules/9b70a34a678346b185f9b81c7a291d8b
    {
      "domain_restrictions": {
        "domains": [
          "mywebsite.com"
        ],
        "type": "whitelist"
      },
      "geographic_restrictions": {
        "type": "whitelist",
        "locations": [
          "US",
          "EU"
        ]
      }
    }
    

Backlot returns a response similar to the following:

{
  "name": "My Publishing Rule",
  "allowed_devices": [

  ],
  "time_restrictions": {
    "start_date": "2007-04-05T00:00:00+00:00",
    "type": "range",
    "end_date": null
  },
  "domain_restrictions": {
    "domains": [
      "mywebsite.com"
    ],
    "type": "whitelist"
  },
  "geographic_restrictions": {
    "type": "whitelist",
    "locations": [
      "US",
      "EU"
    ]
  },
  "id": "79feefbe24d9424786d53b5edffb4b94"
}
    

Sorting Try it

This example lists all publishing rules:

[GET] /v2/publishing_rules
    

Backlot returns configuration settings for all publishing
rules.

This example information about a specific publishing rule:

[GET] /v2/publishing_rules/79feefbe24d9424786d53b5edffb4b94
    

Backlot returns a response similar to the following:

{
  "name": "My Publishing Rule",
  "allowed_devices": [

  ],
  "time_restrictions": {
    "start_date": "2007-04-05T00:00:00+00:00",
    "type": "range",
    "end_date": null
  },
  "domain_restrictions": {
    "domains": [
      "mywebsite.com"
    ],
    "type": "whitelist"
  },
  "geographic_restrictions": {
    "type": "whitelist",
    "locations": [
      "US",
      "EU"
    ]
  },
  "id": "79feefbe24d9424786d53b5edffb4b94"
}
    

Sorting Try it

This example deletes a publishing rule:

[DELETE] /v2/publishing_rules/79feefbe24d9424786d53b5edffb4b94
    

Backlot returns a 200 response.

Sorting Try it