Editing Publishing Rules

You can edit a publishing rule at any time. Any videos, channels, or channel sets that use the publishing rule are automatically updated.

To edit a publishing rule:

Use PATCH with the publishing_rule route. The following example changes the name of the publishing rule and adds Sundays to the list of allowed days for the 5b3ff777724d46f publishing rule.
[PATCH]/v2/publishing_rules/5b3ff777724d46f{  
   "name":"My Super Awesome Publishing Rule",
   "time_restrictions":{  
      "type":"recurring",
      "start_date":"2010-01-01",
      "end_date":null,
      "recurring_days":[  
         "MON",
         "WED",
         "SUN"
      ],
      "all_day":false,
      "start_time":"20:00:00",
      "end_time":"23:59:00"
   }
}

Backlot returns a response similar to the following.

{  
   "name":"My Super Awesome Publishing Rule",
   "allowed_devices":[  
      "desktop",
      "ipad"
   ],
   "time_restrictions":{  
      "start_date":"2010-01-01",
      "end_time":"23:59:00",
      "recurring_days":[  
         "SUN",
         "MON",
         "WED"
      ],
      "type":"recurring",
      "end_date":null,
      "all_day":false,
      "start_time":"20:00:00"
   },
   "domain_restrictions":{  
      "domains":[  
         "mywebsite.com"
      ],
      "type":"whitelist"
   },
   "geographic_restrictions":{  
      "type":"whitelist",
      "locations":[  
         "US",
         "EU"
      ]
   },
   "id":"5b3ff777724d46f"
}
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 publishing rule is successfully edited.

Was this article helpful?