Classic/VPC 환경에서 이용 가능합니다.
사이트를 생성합니다.
참고
- 사이트 생성은 생성일 기준 최대 24시간이 소요될 수 있습니다.
- 사이트 생성 후 반드시 활성화 상태로 전환해야 라이선스 발급이 가능합니다.
- Live Station 서비스 연동 방법은 Live Station 채널 생성 API를 참조해 주십시오.
요청
요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.
| 메서드 | URI |
|---|---|
| POST | /api/v1/sites |
요청 헤더
One Click Multi DRM API에서 공통으로 사용하는 헤더에 대한 정보는 One Click Multi DRM 요청 헤더를 참조해 주십시오.
요청 바디
요청 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
policyId |
Integer | Required | DRM 정책 아이디
|
siteName |
String | Required | 사이트 이름
|
fairPlayCert |
Object | Optional | FairPlay Streaming 인증 정보
|
fairPlayCert.certFile |
String | Optional | FPS 인증서
|
fairPlayCert.privateKey |
String | Optional | 개인 키
|
fairPlayCert.privateEncryptedString |
String | Optional | 개인 키 파일을 열 수 있는 암호 문자열 |
fairPlayCert.secretKey |
String | Optional | ASK (Application secret key) 문자열
|
요청 예시
요청 예시는 다음과 같습니다.
curl --location --request POST 'https://multi-drm.apigw.ntruss.com/api/v1/sites' \
--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 '{
"policyId": 0,
"siteName": "myDrmSite",
"fairPlayCert": {
"certFile": "https://kr.object.ncloudstorage.com/sitebucket/myFairPlayCert.cer",
"privateKey": "https://kr.object.ncloudstorage.com/sitebucket/myFairPlayCertPrivateKey.pem",
"privateEncryptedString": "***********",
"secretKey": "***********"
}
}'
응답
응답 형식을 설명합니다.
응답 바디
응답 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
success |
Boolean | - | API 처리 결과
|
content |
Object | - | 사이트 정보 |
content.disabled |
Boolean | - | Sub Account 비활성화 여부
|
content.siteId |
String | - | 사이트 아이디 |
content.siteName |
String | - | 사이트 이름 |
content.siteStatus |
String | - | 사이트 상태
|
content.siteEnabledYn |
Boolean | - | 사이트 활성화 여부
|
content.policyId |
Integer | - | DRM 정책 아이디
|
content.fairPlayCert |
Object | - | FairPlay Streaming 인증 정보 |
content.fairPlayCert.certFile |
String | - | FPS 인증서
|
content.fairPlayCert.privateKey |
String | - | 개인 키
|
content.fairPlayCert.privateEncryptedString |
String | - | 개인 키 파일을 열 수 있는 암호 문자열 |
content.fairPlayCert.secretKey |
String | - | ASK (Application secret key) 문자열
|
content.statistics |
Object | - | 사이트 통계 정보 |
content.siteCreatedTime |
Integer | - | 사이트 생성 일시(밀리초)
|
content.siteUpdatedTime |
Integer | - | 사이트 수정 일시(밀리초)
|
응답 상태 코드
One Click Multi DRM API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 One Click Multi DRM 응답 상태 코드를 참조해 주십시오.
응답 예시
응답 예시는 다음과 같습니다.
{
"success": true,
"content": {
"disabled": false,
"siteId": "drm-20250903141775-*****",
"siteName": "myDrmSite",
"siteStatus": "CREATING",
"siteEnabledYn": false,
"policyId": 0,
"fairPlayCert": {
"certFile": "myFairPlayCert.cer",
"privateKey": "myFairPlayCertPrivateKey.pem",
"privateEncryptedString": "***********",
"secretKey": "***********"
},
"statistics": {},
"siteCreatedTime": 1756876670519,
"siteUpdatedTime": 1756876670519
}
}