One Click Multi DRM의 사이트를 생성하는 API 입니다.
생성한 사이트 조회를 위해 사이트 목록 조회 API와 사이트 상세 정보 조회 API를 제공합니다.
참고
사이트 생성 시 유의 사항은 다음과 같습니다.
- 사이트 생성은 생성일 기준 최대 24시간 소요될 수 있습니다. 사이트 생성 후 라이선스 발급이 가능합니다.
- 사이트 생성 완료 후 반드시 사이트를 활성화 상태로 전환한 이후 라이센스 발급이 가능합니다.
요청
POST https://multi-drm.apigw.gov-ntruss.com/api/v1/sites
요청 헤더
헤더명 | 필수 여부 | 설명 |
---|---|---|
x-ncp-apigw-timestamp | YES | 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타냄 API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주 x-ncp-apigw-timestamp:{Timestamp} |
x-ncp-iam-access-key | YES | 네이버 클라우드 플랫폼 포털에서 발급받은 Access Key ID 값x-ncp-iam-access-key:{Sub Account Access Key} |
x-ncp-apigw-signature-v2 | YES | Access Key ID 값과 Secret Key로 암호화한 서명x-ncp-apigw-signature-v2:{API Gateway Signature} |
Content-Type | YES | Request body content type을 application/json으로 지정Content-Type: application/json |
x-ncp-region_code | YES | 리전 코드 (KR) |
요청 바디
필드명 | 필수 여부 | 타입 | 제약 사항 | 설명 |
---|---|---|---|---|
siteName | Yes | String | 최소 3글자 이상 최대 20자 문자까지 입력 가능 특수 문자 붙임표(-) 허용 |
생성할 사이트의 이름 |
policyId | Yes | Integer | default policyId : 0 | DRM 적용시 활용할 drm type 별 playback, security policy |
fairPlayCert | Optional | Object | FairPlay Streaming DRM 적용을 위한 fairplay certitication | |
fairPlayCert.certFile | Optional | String | *.der or *.cer 파일만 지원 | Apple 을 통해 획득한 FairPlay Streaming 인증서 http download url 만 지원함 |
fairPlayCert.privateKey | Optional | String | *.pem 파일만 지원 | Apple 을 통해 획득한 FairPlay Streaming 인증서 개인키 파일 http download url 만 지원함 |
fairPlayCert.privateEncryptedString | Optional | String | FairPlay Streaming 인증서 발급 시 획득한 개인키 (private key) | |
fairPlayCert.secretKey | Optional | String | FairPlay Streaming 인증서 발급 시 획득한 Application secret key (ASK) 문자열 |
응답
필드명 | 필수 여부 | 타입 | 제약 | 설명 |
---|---|---|---|---|
siteName | Yes | String | 최소 3글자 이상 최대 20자 문자까지 입력 가능 특수 문자 붙임표(-) 허용 |
생성할 사이트의 이름 |
siteId | Yes | String | 생성된 사이트 고유 ID | |
siteStatus | Yes | String | CREATING,READY,RUNNING,DELETED | 생성된 사이트의 상태 |
siteEnabledYn | Yes | Boolean | 사이트 활성화 여부 | |
policyId | Yes | Integer | default policyId : 0 | DRM 적용시 활용할 drm type 별 playback, security policy |
fairPlayCert | Optional | Object | FairPlay Streaming DRM 적용을 위한 fairplay certitication | |
fairPlayCert.certFile | Optional | String | *.der or *.cer 파일만 지원 | Apple 을 통해 획득한 FairPlay Streaming 인증서 http download url 만 지원함 |
fairPlayCert.privateKey | Optional | String | *.pem 파일만 지원 | Apple 을 통해 획득한 FairPlay Streaming 인증서 개인키 파일 http download url 만 지원함 |
fairPlayCert.privateEncryptedString | Optional | String | FairPlay Streaming 인증서 발급시 획득한 개인키 (private key) | |
fairPlayCert.secretKey | Optional | String | FairPlay Streaming 인증서 발급시 획득한 Application secret key (ASK) 문자열 | |
siteCreatedTime | Yes | Timestamp | 사이트 생성 시각 | |
siteUpdatedTime | Yes | Timestamp | 사이트가 업데이트된 시각 |
예시
요청 예시
POST /api/v1/sites
HOST: multi-drm.apigw.gov-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"
}
응답 예시
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
}
}