Get All Studio DRM Policy Configurations

Retrieves all Studio DRM policy configurations associated with your user account.

Request

Request syntax:

GET /drm/policies

Response

The response for a successful request contains the following parameters:

NameData TypeDescription
configsList of dictionariesContains all of the Studio DRM policy configurations associated with the current user.
errorIntegerIndicates whether an error occurred. Learn more.

Sample Request/Response

Call the get_all_studio_drm_pc module (Python 3) to retrieve a list of Studio DRM policy configurations. This module imports names from the api_auth module.

import requests
from api_auth import APICredentials, APIParams

class DRMPolicies:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        """
        Retrieve all DRM policies.
        """
        self._get_drm_policies()

    def _get_drm_policies(self):
        url = "{}{}".format(self.host, "/api/v3/drm/policies")

        response = requests.get(
            url, params=APIParams(APICredentials()).get_params({})
        )

        print(response.json())

DRMPolicies().run()

Response:

{
    'configs': [{
        '_id': 'abcdef123456ghijkl7890123mno789',
        'created': 1558566151978,
        'policy_name': 'My First Policy',
        'fairplay': {
            'key_duration_seconds': 0,
            'hd': {
                'hdcp_enforcement': -1,
                'allow_airplay': False,
                'allow_av_adapter': False
            },
            'persistence_duration_seconds': 0,
            'rental_duration_seconds': 0,
            'lease_duration_seconds': 0,
            'uhd2': {
                'hdcp_enforcement': -1,
                'allow_airplay': True,
                'allow_av_adapter': True
            },
            'uhd1': {
                'hdcp_enforcement': -1,
                'allow_airplay': True,
                'allow_av_adapter': True
            },
            'playback_duration_seconds': 0,
            'sd': {
                'hdcp_enforcement': -1,
                'allow_airplay': True,
                'allow_av_adapter': True
            },
            'rental': False,
            'persistence': False,
            'lease': False
        },
        'lmsig': '1538693547862491_10735_4271',
        'widevine': {
            'content_key_specs': [{
                'track_type': 'ALL',
                'security_level': 1,
                'required_output_protection': {
                    'hdcp_srm_rule': 'HDCP_SRM_RULE_NONE',
                    'hdcp': 'HDCP_NONE',
                    'cgms_flags': 'CGMS_NONE',
                    'disable_analog_output': False
                }
            }],
            'policy_overrides': {
                'renewal_retry_interval_seconds': 0,
                'can_renew': True,
                'can_persist': True,
                'license_duration_seconds': 86400,
                'always_include_client_id': False,
                'can_play': True,
                'rental_duration_seconds': 0,
                'renewal_delay_seconds': 0,
                'renewal_recovery_duration_seconds': 0,
                'playback_duration_seconds': 0,
                'renew_with_usage': False
            }
        },
        'owner': 'abc33864a92c46a1a286cdd49b0a9123',
        'playready': {
            'license_duration_seconds': 86400,
            'can_persist': False,
            'can_play': True,
            'uhd2': {
                'digital_video_protection_level': 250,
                'security_level': 2000,
                'play_enabler': False,
                'require_hdcp_type_1': True
            },
            'uhd1': {
                'digital_video_protection_level': 250,
                'security_level': 2000,
                'play_enabler': False,
                'require_hdcp_type_1': True
            },
            'playback_duration_seconds': 0,
            'hd': {
                'digital_video_protection_level': 250,
                'security_level': 2000,
                'play_enabler': False,
                'require_hdcp_type_1': True
            },
            'sd': {
                'require_hdcp_type_1': False,
                'security_level': 2000,
                'play_enabler': False,
                'digital_video_protection_level': 100
            }
        },
        'lastmod': 1558566152020
    }],
    'error': 0
}