Skip to content

Latest commit

 

History

History
113 lines (75 loc) · 6.79 KB

README.md

File metadata and controls

113 lines (75 loc) · 6.79 KB

DrmConfigurations

Overview

Available Operations

get_drm_configuration

This endpoint retrieves the DRM configuration (DRM ID) associated with a workspace. It returns a list of DRM configurations, identified by a unique DRM ID, which is used for creating DRM encrypted asset.

How it works:

  1. Make a GET request to this endpoint.
  2. Optionally use the offset and limit query parameters to paginate through the list of DRM configurations.
  3. The response includes a list of DRM IDs and pagination metadata.

Example:
A media service provider may retrieve DRM configuration for a workspace to create DRM content.

Related guide: Manage DRM configuration

Example Usage

import os
import json

from fastpix_python import Fastpix, models

with Fastpix(
    security=models.Security(
        username="your-access-token",
        password="your-secret-key",
    ),
) as fastpix:

    res = fastpix.drm_configurations.get_drm_configuration(offset=1, limit=10)

    # Handle response
    print(json.dumps(res.model_dump(mode="json", by_alias=True, exclude_unset=True), indent=2))

Parameters

Parameter Type Required Description Example
offset Optional[int] ➖ Offset determines the starting point for data retrieval within a paginated list. 1
limit Optional[int] ➖ Limit specifies the maximum number of items to display per page. 10
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.GetDrmConfigurationResponse

Errors

Error Type Status Code Content Type
errors.FastpixDefaultError 4XX, 5XX */*

get_drm_configuration_by_id

This endpoint retrieves a DRM configuration ID. It is used to fetch the DRM-related ID for a workspace, typically required when validating or applying DRM policies to video assets.

How it works:

  1. Make a GET request to this endpoint, replacing {drmConfigurationId} with the UUID of the DRM configuration.
  2. The response contains the associated DRM configuration ID.

Related guide: Manage DRM configuration

Example Usage

import os
import json

from fastpix_python import Fastpix, models

with Fastpix(
    security=models.Security(
        username="your-access-token",
        password="your-secret-key",
    ),
) as fastpix:

    res = fastpix.drm_configurations.get_drm_configuration_by_id(drm_configuration_id="your-drm-configuration-id")

    # Handle response
    print(json.dumps(res.model_dump(mode="json", by_alias=True, exclude_unset=True), indent=2))

Parameters

Parameter Type Required Description Example
drm_configuration_id str ✔️ The unique identifier of the DRM configuration. your-drm-configuration-id
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.GetDrmConfigurationByIDResponse

Errors

Error Type Status Code Content Type
errors.FastpixDefaultError 4XX, 5XX */*