Updates the configuration of an existing clipping profile.
Request
Request syntax:
PATCH /clipping-profiles/Clipping Profile ID
Request URL variable:
Define the following variable when submitting the above request:
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Clipping Profile ID Required | Identifies a clipping profile by its system-defined or external ID. Use the Get Multiple Clipping Profiles endpoint to retrieve a list of clipping profiles and their IDs. |
Request body parameters:
name | String | This is the name/description of the profile. It will be displayed in CMS and when creating a clip |
---|---|---|
show_ext_id | Boolean | Show external ID option in the clipping tool |
default_drm | Boolean | Require a token for playback on new clips |
default_studio_drm | Boolean | Enable Studio DRM for playback on all new clips |
default_overlay | String | This will be a GUID that represents an overlay that has been added to the profile |
default_intro | String | This will be a GUID that represents an asset |
default_outro | String | This will be a GUID that represents an asset |
default_library | String | This will be a GUID that represents a Library. This is used in CMS to display a shorter list of assets when trying to decide what intro/outro bumper to use |
Sample Request/Response
Call the [clipping_profiles_patch module](../Resources/Scripts/clipping_profile_patch.py) (Python 3) to update a profile. This module imports names from the api_auth module.
import json
from pprint import PrettyPrinter
import requests
from api_auth import APICredentials, APIParams
pp = PrettyPrinter().pprint
class ClippingProfiles:
"""Class Description"""
def __init__(self, source_list):
"""dummy"""
self.profile_id = None
for key, value in source_list.items():
setattr(self, key, value)
self.host = "https://services.uplynk.com"
self.headers = {"Content-Type": "application/json"}
def run(self):
"""dummy"""
self._get_youtube_login_url()
def _get_youtube_login_url(self):
"""dummy"""
url = "{}{}".format(self.host, f"/api/v4/clipping-profiles/{self.profile_id}")
payload = {
"desc": "My First Clipping Profile",
"default_intro": '',
}
response = requests.patch(
url,
params=APIParams(APICredentials()).get_params({}),
data=json.dumps(payload),
headers=self.headers,
timeout=15
)
pp(response.json())
class_variables = {"profile_id": "be1af15490e24399bb6c4f2a36384d66"}
ClippingProfiles(class_variables).run()
Response:
{
{
"@id": "/api/v4/clipping-profiles/be1af15490e24399bb6c4f2a36384d66",
"@type": "ClippingProfile",
"default_drm": True,
"default_intro": None,
"default_library": None,
"default_outro": None,
"default_overlay": None,
"default_studio_drm": True,
"desc": "My First Clipping Profile",
"id": "be1af15490e24399bb6c4f2a36384d66",
"show_ext_id": True,
}