Available in Classic and VPC
Edit a DRM policy.
To edit a policy currently applied to a site, disable the site first. Editing a policy while the site is enabled may affect license issuance and playback.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| PUT | /api/v1/policy/{policyId} |
Request headers
For information about the headers common to all One Click Multi DRM APIs, see One Click Multi DRM request headers.
Request path parameters
You can use the following path parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
policyId |
Integer | Required | DRM policy ID
|
Request body
You can include the following data in the body of your request:
| Field | Type | Required | Description |
|---|---|---|---|
policyName |
String | Required | Policy name
|
persistent |
Boolean | Required | Whether to save offline licenses
|
rentalDuration |
Integer | Required | Validity period (seconds) during which content must be played for the first time after obtaining an offline license
|
playbackDuration |
Integer | Required | License validity period (seconds) from the initial playback start time of the content
|
drmPolicyConfig |
Object | Required | Policy settings by DRM type |
drmPolicyConfig.widevine |
Object | Required | Widevine type policy |
drmPolicyConfig.widevine.useYn |
Boolean | Required | Widevine policy usage
|
drmPolicyConfig.widevine.securityLevel |
Integer | Optional | Widevine security level value
|
drmPolicyConfig.widevine.hdcp |
String | Optional | Security (HDCP) level for digital output
|
drmPolicyConfig.widevine.cgms |
String | Optional | Security (CGMS-A) level for analog output
|
drmPolicyConfig.widevine.disableAnalogOutputYn |
Boolean | Optional | Whether analog output is blocked
|
drmPolicyConfig.widevine.hdcpSrmRule |
String | Optional | Whether content can be played when an HDCP device fails to process System Renewability Message (SRM)
|
drmPolicyConfig.widevine.deviceRevocation |
Boolean | Optional | Whether to allow license issuance for revoked (withdrawn from Widevine support) Android devices
|
drmPolicyConfig.playready |
Object | Required | PlayReady type policy |
drmPolicyConfig.playready.useYn |
Boolean | Required | PlayReady policy usage
|
drmPolicyConfig.playready.securityLevel |
Integer | Optional | PlayReady security level value
|
drmPolicyConfig.playready.digitalVideoProtectionLevel |
Integer | Optional | Security level for digital video output
|
drmPolicyConfig.playready.analogVideoProtectionLevel |
Integer | Optional | Security level for analog video output
|
drmPolicyConfig.playready.digitalAudioProtectionLevel |
Integer | Optional | Security level for digital audio output
|
drmPolicyConfig.playready.hdcpUseYn |
Boolean | Optional | Whether to require Type 1 (HDCP V2.2 or later) when HDCP is applied according to output protection level (OPL) settings
|
drmPolicyConfig.fairplay |
Object | Required | FairPlay Streaming type policy |
drmPolicyConfig.fairplay.useYn |
Boolean | Required | FairPlay Streaming policy usage
|
drmPolicyConfig.fairplay.hdcpEnforcement |
String | Optional | Whether HDCP is applied and HDCP version
|
drmPolicyConfig.fairplay.allowAirPlay |
Boolean | Optional | Whether to allow AirPlay
|
drmPolicyConfig.fairplay.allowAvAdaptor |
Boolean | Optional | Whether output is permitted via digital AV adapter
|
Request example
The request example is as follows:
curl --location --request PUT 'https://multi-drm.apigw.ntruss.com/api/v1/policy/82' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--header 'x-ncp-region_code: KR' \
--data '{
"policyName": "myPolicy",
"persistent": true,
"rentalDuration": 10,
"playbackDuration": 10,
"drmPolicyConfig": {
"widevine": {
"useYn": true,
"securityLevel": 1,
"hdcp": "HDCP_NONE",
"cgms": "CGMS_NONE",
"disableAnalogOutputYn": true,
"hdcpSrmRule": "HDCP_SRM_RULE_NONE",
"deviceRevocation": true
},
"playready": {
"useYn": true,
"securityLevel": 150,
"digitalVideoProtectionLevel": 100,
"analogVideoProtectionLevel": 100,
"digitalAudioProtectionLevel": 100,
"hdcpUseYn": true
},
"fairplay": {
"useYn": true,
"hdcpEnforcement": -1,
"allowAirPlay": true,
"allowAvAdaptor": true
}
}
}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
success |
Boolean | - | API processing result
|
content |
Object | - | Policy information |
content.disabled |
Boolean | - | Whether Sub Account is disabled
|
content.policyId |
Integer | - | DRM policy ID
|
content.policyName |
String | - | Policy name |
content.policyStatus |
String | - | Policy status
|
content.policyCreatedTime |
Integer | - | Policy creation date and time (millisecond)
|
content.policyUpdateTime |
Integer | - | Policy modification date and time (millisecond)
|
content.persistent |
Boolean | - | Whether to save the license offline
|
content.rentalDuration |
Integer | - | Validity period (second) after offline license acquisition during which content must be played for the first time |
content.playbackDuration |
Integer | - | License validity period (seconds) from the initial playback start time of the content |
content.drmPolicyConfig |
Object | - | Policy settings by DRM type |
content.drmPolicyConfig.wideVine |
Object | - | Widevine type policy |
content.drmPolicyConfig.wideVine.useYn |
Boolean | - | Widevine policy usage
|
content.drmPolicyConfig.wideVine.securityLevel |
Integer | - | Widevine security level value
|
content.drmPolicyConfig.wideVine.hdcp |
String | - | Security (HDCP) level for digital output
|
content.drmPolicyConfig.wideVine.cgms |
String | - | Security (CGMS-A) level for analog output
|
content.drmPolicyConfig.wideVine.disableAnalogOutputYn |
Boolean | - | Whether analog output is blocked
|
content.drmPolicyConfig.wideVine.hdcpSrmRule |
String | - | Whether content can be played when an HDCP device fails to process System Renewability Message (SRM)
|
content.drmPolicyConfig.wideVine.deviceRevocation |
Boolean | - | Whether to allow license issuance for revoked (withdrawn from Widevine support) Android devices
|
content.drmPolicyConfig.playReady |
Object | - | PlayReady type policy |
content.drmPolicyConfig.playReady.useYn |
Boolean | - | PlayReady policy usage
|
content.drmPolicyConfig.playReady.securityLevel |
Integer | - | PlayReady security level value
|
content.drmPolicyConfig.playReady.digitalVideoProtectionLevel |
Integer | - | Security level for digital video output
|
content.drmPolicyConfig.playReady.analogVideoProtectionLevel |
Integer | - | Security level for analog video output
|
content.drmPolicyConfig.playReady.digitalAudioProtectionLevel |
Integer | - | Security level for digital audio output
|
content.drmPolicyConfig.playReady.hdcpUseYn |
Boolean | - | Whether to require Type 1 (HDCP V2.2 or later) when HDCP is applied according to output protection level (OPL) settings
|
content.drmPolicyConfig.fairPlay |
Object | - | FairPlay Streaming type policy |
content.drmPolicyConfig.fairPlay.useYn |
Boolean | - | FairPlay Streaming policy usage
|
content.drmPolicyConfig.fairPlay.hdcpEnforcement |
String | - | Whether HDCP is applied and HDCP version
|
content.drmPolicyConfig.fairPlay.allowAirPlay |
Boolean | - | Whether to allow AirPlay
|
content.drmPolicyConfig.fairPlay.allowAvAdaptor |
Boolean | - | Whether output is permitted via digital AV adapter
|
Response status codes
For information about the response status codes common to all One Click Multi DRM APIs, see One Click Multi DRM response status codes.
Response example
The response example is as follows:
{
"success": true,
"content": {
"disabled": false,
"policyId": 82,
"policyName": "myPolicy",
"policyStatus": "CREATED",
"policyCreatedTime": 1757896403844,
"policyUpdateTime": 1757897494407,
"persistent": true,
"rentalDuration": 10,
"playbackDuration": 10,
"drmPolicyConfig": {
"wideVine": {
"useYn": true,
"securityLevel": 1,
"hdcp": "HDCP_NONE",
"cgms": "CGMS_NONE",
"disableAnalogOutputYn": true,
"hdcpSrmRule": "HDCP_SRM_RULE_NONE",
"deviceRevocation": true
},
"playReady": {
"useYn": true,
"securityLevel": 150,
"digitalVideoProtectionLevel": 100,
"analogVideoProtectionLevel": 100,
"digitalAudioProtectionLevel": 100,
"hdcpUseYn": true
},
"fairPlay": {
"useYn": true,
"hdcpEnforcement": -1,
"allowAirPlay": true,
"allowAvAdaptor": true
}
}
}
}