Adds a new clipping profile with specified configurations.
Request
Request syntax:
POST /clipping-profiles
Request body parameters:
Pass the following request body parameters (pass only the fields you want to update):
desc Required | 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_create module (Python 3) to add a clipping profile. This module imports names from the api_auth module.
Request:
import json
import requests
from api_auth import APICredentials, APIParams
from pprint import PrettyPrinter
pp = PrettyPrinter().pprint
class ClippingProfiles:
"""Class Description"""
def __init__(self):
"""dummy"""
self.host = "https://services.uplynk.com"
self.headers = {"Content-Type": "application/json"}
def run(self):
"""dummy"""
self._create_profile()
def _create_profile(self):
"""dummy"""
url = f"{self.host}/api/v4/clipping-profiles"
payload = {
"desc": "My First Clipping Profile",
}
response = requests.post(
url,
params=APIParams(APICredentials()).get_params({}),
data=json.dumps(payload),
headers=self.headers,
timeout=15
)
pp(response.json())
ClippingProfiles().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}