カテゴリの更新

Prev Next

Classic/VPC環境で利用できます。

カテゴリを更新します。

リクエスト

リクエスト形式を説明します。リクエスト形式は次の通りです。

メソッド URI
PUT /api/v2/category/{categoryId}

リクエストヘッダ

VOD Station APIで共通して使用されるヘッダの詳細は、VOD Stationのリクエストヘッダをご参照ください。

リクエストパスパラメータ

リクエストパスパラメータの説明は次の通りです。

フィールド タイプ 必須の有無 説明
categoryId String Required カテゴリ ID

リクエストボディ

リクエストボディの説明は次の通りです。

フィールド タイプ 必須の有無 説明
encodingOptions Array Optional カテゴリに設定するエンコードオプション
encodingOptionTemplateId Integer Optional エンコードテンプレート ID
  • テンプレートの照会を参照
  • このテンプレート IDに含まれているencodingOptionIdリスト値をencodingOptionsフィールド値に設定
thumbnail Boolean Optional サムネイル抽出設定
  • true | false(デフォルト)
    • true: 設定
    • false: 設定しない
notificationUrl String Optional Callback設定
output Object Required カテゴリの出力設定
output.thumbnailBucketName String Optional サムネイル抽出ファイル保存先のバケット名
output.thumbnailFilePath String Optional サムネイル抽出ファイル保存先の詳細パス
advancedOptions Object Optional 高度な設定
advancedOptions.trimming Object Optional 出力ファイルのトリミング(再生区間)設定
advancedOptions.trimming.startTimeCode String Required トリミング開始点(HH:MM:SS.S)
advancedOptions.trimming.endTimeCode String Required トリミング終了点(HH:MM:SS.S)
  • advancedOptions.trimming.startTimeCodeより小さい値は入力不可
advancedOptions.imageOverlay Object Optional 画像オーバーレイ(挿入)設定
advancedOptions.imageOverlay.input Object Required 画像の設定
advancedOptions.imageOverlay.input.bucketName String Required 画像が保存されているバケット名
advancedOptions.imageOverlay.input.filePath String Required ファイル名を含む画像の詳細パス
advancedOptions.imageOverlay.position Object Required 画像位置の設定
advancedOptions.imageOverlay.position.x Integer Required x軸の位置(ピクセル)
advancedOptions.imageOverlay.position.y Integer Required y軸の位置(ピクセル)
advancedOptions.imageOverlay.size Object Required 画像サイズの設定
advancedOptions.imageOverlay.size.width Integer Required 画像の幅(ピクセル)
advancedOptions.imageOverlay.size.height Integer Required 画像の高さ(ピクセル)

リクエスト例

リクエストのサンプルコードは次の通りです。

curl --location --request PUT 'https://vodstation.apigw.ntruss.com/api/v2/category/*****' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--data '{
    "encodingOptions": [1, 2, 3],
    "encodingOptionTemplateId": 1,
    "thumbnail": true,
    "notificationUrl": "https://example.com/vodstation/callback",
    "output": {
        "thumbnailBucketName": "station-000",
        "thumbnailFilePath": "/thumbnail"
    },
    "advancedOptions": {
        "trimming": {
            "startTimeCode": "00:00:00.0",
            "endTimeCode": "00:00:08.9"
        },
        "imageOverlay": {
            "input": {
                "bucketName": "station-000",
                "filePath": "/VODStation.png"
            },
            "position": {
                "x": 50,
                "y": 50
            },
            "size": {
                "width": 50,
                "height": 50
            }
        }
    }
}'

レスポンス

レスポンス形式を説明します。

レスポンスボディ

レスポンスボディの説明は次の通りです。

フィールド タイプ 必須の有無 説明
content Object - レスポンス結果
content.disabled Boolean - Sub Accountは無効化するか
  • true | false
    • true: 無効化
    • false: 有効化
content.id Integer - カテゴリ ID
content.name String - カテゴリ名
content.thumbnail Boolean - サムネイル抽出を設定するか
  • true | false
    • true: 抽出
    • false: 抽出しない
content.notificationUrl String - コールバック(Callback) URL
content.output Object - 出力設定情報
content.output.bucketName String - 出力ファイル保存先のバケット名
content.output.filePath String - 出力ファイル保存先の詳細パス
content.output.accessControl String - 出力ファイルの公開範囲
content.output.thumbnailAccessControl String - 出力サムネイルの公開範囲
content.output.thumbnailBucketName String - 出力サムネイル保存先のバケット名
content.output.thumbnailFilePath String - 出力サムネイル保存先バケットの詳細パス
content.lastWorkStart Integer - 最終ジョブ開始時間(ミリ秒)
  • Unix Timestamp形式
content.createTime Integer - カテゴリ作成日時(ミリ秒)
  • Unix Timestamp形式
content.updateTime Integer - カテゴリ更新日時(ミリ秒)
  • Unix Timestamp形式
content.status String - カテゴリの状態
  • CREATED | DELETED | RUNNING
    • CREATED: 作成完了
    • DELETED: 削除完了
    • RUNNING: 使用中
content.outputTotalSize Integer - 出力ファイルの総サイズ(Byte)
content.outputTotal Integer - 出力ファイルの総数
content.inputTotal Integer - 入力ファイルの総数
content.outputType Integer - エンコード設定に応じた出力タイプ数
content.advancedOptions Object - 高度な設定情報
content.advancedOptions.trimming Object - 出力ファイルのトリミング(再生区間)設定
content.advancedOptions.trimming.startTimeCode String - トリミング開始点(HH:MM:SS.S)
content.advancedOptions.trimming.endTimeCode String - トリミング終了点(HH:MM:SS.S)
content.advancedOptions.imageOverlay Object - 画像オーバーレイ(挿入)設定
content.advancedOptions.imageOverlay.input Object - 画像の設定情報
content.advancedOptions.imageOverlay.input.bucketName String - 画像が保存されているバケット名
content.advancedOptions.imageOverlay.input.filePath String - ファイル名を含む画像の詳細パス
content.advancedOptions.imageOverlay.size Object - 画像のサイズ情報
content.advancedOptions.imageOverlay.size.width Integer - 画像の幅(ピクセル)
content.advancedOptions.imageOverlay.size.height Integer - 画像の高さ(ピクセル)
content.advancedOptions.imageOverlay.position Object - 挿入する画像位置の設定
content.advancedOptions.imageOverlay.position.x Integer - x軸の位置(ピクセル)
content.advancedOptions.imageOverlay.position.y Integer - y軸の位置(ピクセル)
content.encodingOptions Array - エンコードオプション ID
content.encodingOptionTemplateId Integer - エンコードテンプレート ID

レスポンスステータスコード

VOD Station APIで共通して使用されるレスポンスステータスコードの詳細は、VOD Stationのレスポンスステータスコードをご参照ください。

レスポンス例

レスポンスのサンプルコードは次の通りです。

{
    "content": {
        "disabled": false,
        "id": *****,
        "name": "VOD-Category",
        "thumbnail": true,
        "notificationUrl": "https://example.com/vodstation/callback",
        "output": {
            "bucketName": "station-000",
            "filePath": "/",
            "accessControl": "PUBLIC_READ",
            "thumbnailAccessControl": "PUBLIC_READ",
            "thumbnailBucketName": "station-000",
            "thumbnailFilePath": "/thumbnail"
        },
        "lastWorkStart": 1755576724000,
        "createTime": 1755569623000,
        "updateTime": 1755581015000,
        "status": "CREATED",
        "outputTotalSize": 3421908,
        "outputTotal": 3,
        "inputTotal": 1,
        "outputType": 3,
        "advancedOptions": {
            "trimming": {
                "startTimeCode": "00:00:00.0",
                "endTimeCode": "00:00:08.9"
            },
            "imageOverlay": {
                "input": {
                    "bucketName": "station-000",
                    "filePath": "/VODStation.png"
                },
                "size": {
                    "width": 50,
                    "height": 50
                },
                "position": {
                    "x": 50,
                    "y": 50
                }
            }
        },
        "encodingOptions": [
            1,
            2,
            3
        ],
        "encodingOptionTemplateId": 1
    }
}