카테고리 수정

Prev Next

VOD Station은 카테고리를 수정하기 위한 API를 제공합니다.

요청

PUT https://vod-station.apigw.gov-ntruss.com/api/v2/category/{categoryId}

요청 헤더

헤더명 설명
x-ncp-region_code 네이버 클라우드 플랫폼 region code
x-ncp_region_code:{Region Code}
x-ncp-apigw-timestamp 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 표현
API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-iam-access-key 네이버 클라우드 플랫폼 포털에서 발급받은 Access Key ID 값
x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v2 Access Key ID 값과 Secret Key로 암호화한 서명
x-ncp-apigw-signature-v2:{API Gateway Signature}
Content-Type Request body content type을 application/json으로 지정
Content-Type: application/json

요청 바디

API 요청 시 필드명의 대소문자 구분이 필요합니다.

필드명 필수 여부 타입 제약 사항 기본 값 설명
encodingOptions[] No Array(Integer) NULL 카테고리에 설정할 인코딩 옵션
encodingOptionTemplateId No Integer 인코딩 템플릿 ID로 encodingOptions[] 과 encodingOptionTemplateId는 중복으로 설정할 수 없음
thumbnail No Boolean true, false FALSE 썸네일 추출 설정
output Yes Object 카테고리 출력 설정
output.thumbnailBucketName Optional String 썸네일 출력 버킷 이름
output.thumbnailFilePath Optional String 최소 1자, 최대 256자까지 입력 (영문, 숫자, < > : " / \ ? * % 제외 특수문자 허용) 썸네일 출력 파일을 업로드 할 상세 경로
advancedOptions No Object NULL 고급 설정
advancedOptions.trimming No Object NULL 출력 파일 트리밍 설정
advancedOptions.trimming.startTimeCode Yes String 포맷: "HH:MM:SS.S" 트리밍 시작 시점으로 타임코드 포맷에 맞춰 값 입력
advancedOptions.trimming.endTimeCode Yes String - 포맷: "HH:MM:SS.S"
- startTimeCode보다 작은 값 입력 불가
트리밍 종료 시점으로 타임코드 포맷에 맞춰 값 입력
advancedOptions.imageOverlay No Object NULL 이미지 오버레이 설정
advancedOptions.imageOverlay.input Yes Object 입력 이미지
advancedOptions.imageOverlay.input.bucketName Yes String 입력 이미지가 업로드 되어있는 버킷 이름
advancedOptions.imageOverlay.input.filePath Yes String 입력 이미지의 상세 경로
advancedOptions.imageOverlay.position Yes Object 삽입할 이미지 위치 설정
advancedOptions.imageOverlay.position.x Yes Integer x 축 위치
advancedOptions.imageOverlay.position.y Yes Integer y 축 위치
advancedOptions.imageOverlay.size Yes Obejct 삽입할 이미지 크기 설정
advancedOptions.imageOverlay.size.width Yes Integer 이미지 너비
advancedOptions.imageOverlay.size.height Yes Integer 이미지 높이

응답

필드명 타입 설명 비고
error Object 요청 실패시 응답
오류 응답 코드 및 메시지
error.code Integer 오류 응답 코드
error.message String 오류 응답 메시지
content Object VOD Station OPEN API 응답 객체
content.id String 생성된 카테고리 ID
content.name String 카테고리 이름
content.encodingOptions[] Array(Integer) 인코딩 옵션 ID
content.encodingOptionTemplateId Integer 인코딩 템플릿 ID
content.thumbnail Boolean 썸네일 추출 설정
content.notificationUrl String Callback URL 설정
content.output Object 출력 설정
content.output.bucketName String 출력 버킷 이름
content.output.filePath String 출력 파일을 업로드 할 상세 경로
content.output.thumbnailBucketName String 썸네일 출력 버킷 이름
content.output.thumbnailFilePath String 썸네일 출력 출력 파일 업로드 상세경로
content.output.accessControl String 출력 파일의 공개 범위
content.output.thumbnailAccessControl String 출력 썸네일의 공개 범위
content.status String 카테고리 상태 CREATED, DELETED, RUNNING
content.createTime Integer 카테고리 생성 시간
content.updateTime Integer 카테고리 수정 시간
content.disabled Boolean subaccount 제공 필드
해당 리소스가 subaccount에서 활성 여부
content.inputTotal Integer 입력 파일 총 개수
content.lastWorkStart Integer 마지막 작업 시간
content.outputTotal Integer 출력 파일 총 개수
content.outputTotalSize Integer 출력 파일 총 크기 (단위: byte)
content.outputType Integer 설정된 인코딩 설정에 따른 출력 타입 개수
content.advancedOptions Object 고급 설정
content.advancedOptions.trimming Object 출력 파일 트리밍 설정
content.advancedOptions.trimming.startTimeCode String 트리밍 시작 시점
content.advancedOptions.trimming.endTimeCode String 트리밍 종료 시점
content.advancedOptions.imageOverlay Object 이미지 오버레이 설정
content.advancedOptions.imageOverlay.input Object 입력 이미지
content.advancedOptions.imageOverlay.input.bucketName String 입력 이미지가 업로드 되어있는 버킷 이름
content.advancedOptions.imageOverlay.input.filePath String 입력 이미지의 상세 경로
content.advancedOptions.imageOverlay.position Object 삽입할 이미지 위치 설정
content.advancedOptions.imageOverlay.position.x Integer x축 위치
content.advancedOptions.imageOverlay.position.y Integer y축 위치
content.advancedOptions.imageOverlay.size Obejct 삽입할 이미지 크기 설정
content.advancedOptions.imageOverlay.size.width Integer 이미지 너비
content.advancedOptions.imageOverlay.size.height Integer 이미지 높이

예시

요청 예시

PUT https://vod-station.apigw.gov-ntruss.com/api/v2/category/10095

PUT /api/v2/category/10095
HOST: vod-station.apigw.gov-ntruss.com
Content-Type: application/json
x-ncp-region_code:KR
x-ncp-apigw-timestamp:1631594152000
x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy
x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=

Reqeust body
{
  "encodingOptionTemplateId": 1,
  "thumbnail": false
}

응답 예시

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 12 Sep 2018 09:53:32 GMT
Content-Type: application/json;charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
x-ncp-trace-id: 36c9k60om4p3238cpmc9gm4cj4

{
  "content": {
    "disabled": false,
    "id": 10095,
    "name": "3type-basic-category",
    "thumbnail": false,
    "output": {
      "bucketName": "vs-output",
      "filePath": "/"
    },
    "lastWorkStart": 1631594173000,
    "createTime": 1631594152000,
    "updateTime": 1631597071000,
    "status": "CREATED",
    "outputTotalSize": 50182015,
    "outputTotal": 2,
    "inputTotal": 2,
    "encodingOptionTemplateId": 1
  }
}