Create site
- Print
- PDF
Create site
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
An API that creates the site of One Click Multi DRM.
Site list view APIs and site details view APIs are provided to view the created sites.
Note
The following are the precautions for creating sites:
- A site creation can take up to 24 hours from the day of the creation. You can issue the license after creating the site.
- You must activate the site after creating it to issue a license.
- One Click Multi DRM supports effortless integration with NAVER Cloud Live Station products. For details on the integration, see Live Station DRM application guide.
Requests
POST https://multi-drm.apigw.ntruss.com/api/v1/sites
Request headers
Header name | Requirement status | Description |
---|---|---|
x-ncp-apigw-timestamp | YES | This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 (UTC) If the time difference compared to the API Gateway server is 5 minutes or longer, then the request is considered invalid x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-iam-access-key | YES | Value of access key ID issued in the NAVER Cloud Platform portalx-ncp-iam-access-key:{Sub Account Access Key} |
x-ncp-apigw-signature-v2 | YES | Signature encrypted with the access key ID value and secret keyx-ncp-apigw-signature-v2:{API Gateway Signature} |
Content-Type | YES | Specifies the request body content type as application/jsonContent-Type: application/json |
x-ncp-region_code | YES | Region code (KR) |
Request body
Field name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
siteName | Yes | String | This must be between 3 and 20 characters in length Special character hyphens (-) are allowed | Name of the site to be created |
policyId | Yes | Integer | default policyId : 0 | Playback and security policy according to DRM type used during DRM application |
fairPlayCert | Optional | Object | Fairplay certification for FairPlay Streaming DRM application | |
fairPlayCert.certFile | Optional | String | Only supports *.der or *.cer file | FairPlay Streaming certificate acquired from Apple Only supports http download URL |
fairPlayCert.privateKey | Optional | String | Only supports *.pem files | Private key file of the FairPlay Streaming certificate acquired from Apple Only supports http download URL |
fairPlayCert.privateEncryptedString | Optional | String | Private key acquired upon Fairplay Streaming certificate issuance | |
fairPlayCert.secretKey | Optional | String | Application secret key (ASK) string acquired upon Fairplay Streaming certificate issuance |
Response
Field name | Requirement status | Type | Restriction | Description |
---|---|---|---|---|
siteName | Yes | String | This must be between 3 and 20 characters in length Special character hyphens (-) are allowed | Name of the site to be created |
siteId | Yes | String | Unique ID of the created site | |
siteStatus | Yes | String | CREATING,READY,RUNNING,DELETED | Condition of the created site |
siteEnabledYn | Yes | Boolean | Site activation status | |
policyId | Yes | Integer | default policyId : 0 | Playback and security policy according to DRM type used during DRM application |
fairPlayCert | Optional | Object | Fairplay certification for FairPlay Streaming DRM application | |
fairPlayCert.certFile | Optional | String | Only supports *.der or *.cer file | FairPlay Streaming certificate acquired from Apple Only supports http download URL |
fairPlayCert.privateKey | Optional | String | Only supports *.pem files | Private key file of the FairPlay Streaming certificate acquired from Apple Only supports http download URL |
fairPlayCert.privateEncryptedString | Optional | String | Private key acquired upon Fairplay Streaming certificate issuance | |
fairPlayCert.secretKey | Optional | String | Application secret key (ASK) string acquired upon Fairplay Streaming certificate issuance | |
siteCreatedTime | Yes | Timestamp | Site creation time | |
siteUpdatedTime | Yes | Timestamp | Time the site is updated |
Examples
Request example
POST /api/v1/sites
HOST: multi-drm.apigw.ntruss.com
Content-Type: application/json
x-ncp-apigw-timestamp:1521787414578
x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=
x-ncp-region_code:KR
Request body (if fairplayCert is ready)
{
"fairPlayCert": {
"certFile": "https://kr.object.ncloudstorage.com/myBucket/myFairPlayCert.cer",
"privateEncryptedString": "myFairPlayCertEncryptedString",
"privateKey": "https://kr.object.ncloudstorage.com/myBucket/myFairPlayCertPrivateKey.der",
"secretKey": "myFairPlayCertSecretKey"
},
"policyId": 0,
"siteName": "myDrmSite"
}
Request body (if fairplayCert is not ready)
{
"policyId": 0,
"siteName": "myDrmSite"
}
Response example
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 22 Nov 2023 09:53:32 GMT
Content-Type: application/json;charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4
{
"success": true,
"content": {
"siteId": "drm-20231122192776-MJTKM",
"siteName": "myFirstDrmSite",
"siteStatus": "CREATING",
"siteEnabledYn": false,
"policyId": 0,
"fairPlayCert": {},
"statistics": {},
"siteCreatedTime": 1700648847450,
"siteUpdatedTime": 1700648847450
}
}
Was this article helpful?