MENU
      カテゴリファイルの追加

        カテゴリファイルの追加


        記事の要約

        VOD Stationは、カテゴリにエンコードファイルを追加するための APIを提供します。

        リクエスト

        PUT https://vodstation.apigw.ntruss.com/api/v2/category/{categoryId}/add-files
        HTTP

        リクエストヘッダ

        ヘッダ名説明
        x-ncp-apigw-timestamp1970年1月1日00:00:00協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表す
        API Gatewayサーバとの時間差が5分以上の場合は、無効なリクエストとみなす
        x-ncp-apigw-timestamp:{Timestamp
        x-ncp-iam-access-keyNAVERクラウドプラットフォームポータルで発行された Access Key Id値
        x-ncp-iam-access-key:{Sub Account Access Key}
        x-ncp-apigw-signature-v2Access Key ID値と Secret Keyで暗号化した署名
        x-ncp-apigw-signature-v2:{API Gateway Signature}
        Content-TypeRequest body content typeを application/jsonに指定
        Content-Type: application/json

        リクエストボディ

        APIリクエスト時にフィールド名の大文字・小文字の区別が必要です。

        フィールド名必須の有無タイプ制約事項デフォルト値説明
        bucketNameYesString入力ファイルがアップロードされているバケット名、 httpDownload URLまたは bucketName、filePathを入力してください。
        pathListYesArray(String)100個以下の入力ファイルに対応ファイル名を含む入力ファイルの詳細パス、httpDownload URLまたは bucketName、filePathを入力してください。
        httpDownloadUrlListYesArray(String)100個以下の入力ファイルに対応、
        http url形式、
        AVI、MOV、MP4、MP3、3GP、MPG、MPEG、M4V、VOB、WMV、ASF、MKV、FLV、WEBM、GIF、AV1、MXFの拡張子のみ入力可能
        ファイル名を含む入力ファイルの詳細パス、httpDownload URLまたは bucketName、filePathを入力してください。
        notificationUrlNoString入力ファイルに対する Callback URL設定(Overwrite Category notificationUrl Field)
        outputNoObject入力ファイルに対する出力設定(Overwrite Category output Field)
        output.bucketNameYesString出力バケット名
        output.filePathYesString出力ファイルをアップロードする詳細パス
        output.thumbnailBucketNameOptionalString入力しない場合、 カテゴリ設定に従うサムネイル出力バケット名
        output.thumbnailFilePathOptionalString入力しない場合、 カテゴリ設定に従う
        最低1文字以上、最大256文字まで入力(英字、数字、< > : " / \ ? * %を除く特殊文字は入力可能)
        サムネイル出力ファイルをアップロードする詳細パス
        output.accessControlNoStringPUBLIC_READ, PRIVATEPRIVATE出力ファイルの公開範囲
        output.thumbnailAccessControlNoStringPUBLIC_READ, PRIVATEPRIVATE出力サムネイルの公開範囲
        output.withoutCategoryNameNoBooleantrue, falsefalseOutput出力パスにカテゴリ名のフォルダ作成の有無
        setAdvancedOptionsNoBooleantrue, falsefalse高度な設定の別途設定の有無
        advancedOptionsNoObjectNULL高度な設定
        advancedOptions.trimmingNoObjectNULL出力ファイルのトリミング設定
        advancedOptions.trimming.startTimeCodeYesStringフォーマット: "HH:MM:SS.S"- トリミングの開始時点
        タイムコードフォーマットに合わせて値を入力
        advancedOptions.trimming.endTimeCodeYesStringフォーマット: "HH:MM:SS.S",
        startTimeCodeより小さな値は入力不可
        - トリミングの終了時点
        タイムコードフォーマットに合わせて値を入力
        advancedOptions.imageOverlayNoObjectNULL画像オーバーレイ設定
        advancedOptions.imageOverlay.inputYesObject入力画像
        advancedOptions.imageOverlay.input.bucketNameYesString入力画像がアップロードされているバケット名
        advancedOptions.imageOverlay.input.filePathYesStringファイル名を含む入力画像の詳細パス
        advancedOptions.imageOverlay.positionYesObject挿入する画像位置の設定
        advancedOptions.imageOverlay.position.xYesIntegerx軸の位置
        advancedOptions.imageOverlay.position.yYesIntegery軸の位置
        advancedOptions.imageOverlay.sizeYesObejct挿入する画像サイズの設定
        advancedOptions.imageOverlay.size.widthYesInteger画像の幅
        advancedOptions.imageOverlay.size.heightYesInteger画像の高さ

        レスポンス

        フィールド名タイプ説明備考
        content[]Array(Object)VOD Station OPEN APIレスポンスオブジェクト
        content[].idIntegerファイルエンコードタスク ID
        content[].bucketNameString入力ファイルがアップロードされているバケット名
        content[].pathListArray(String)ファイル名を含む入力ファイルの詳細なパス
        content[].httpDownloadUrlArray(String)外部からダウンロードする HTTP URL
        content[].statusStringファイルのエンコードステータスCOMPLETE, WAITING, RUNNING, FAILURE, CANCELED
        content[].notificationUrlStringCallback URL設定
        content[].outputObject出力設定
        content[].output.bucketNameString出力バケット名
        content[].output.filePathString入力ファイルをアップロードする詳細パス
        content[].output.thumbnailBucketNameStringサムネイル出力バケット名
        content[].output.thumbnailFilePathStringサムネイル出力出力ファイルのアップロードの詳細パス
        content[].output.accessControlString出力ファイルの公開範囲
        content[].output.thumbnailAccessControlString出力サムネイルの公開範囲
        content[].output.withoutCategoryNameBooleanOutput出力パスにカテゴリ名のフォルダ作成の有無
        content[].advancedOptionsObject高度な設定
        content[].advancedOptions.trimmingObject出力ファイルのトリミング設定
        content[].advancedOptions.trimming.startTimeCodeStringトリミングの開始時点
        content[].advancedOptions.trimming.endTimeCodeStringトリミングの終了時点
        content[].advancedOptions.imageOverlayObject画像オーバーレイ設定
        content[].advancedOptions.imageOverlay.inputObject入力画像
        content[].advancedOptions.imageOverlay.input.bucketNameString入力画像がアップロードされているバケット名
        content[].advancedOptions.imageOverlay.input.filePathString入力画像の詳細パス
        content[].advancedOptions.imageOverlay.positionObject挿入する画像位置の設定
        content[].advancedOptions.imageOverlay.position.xIntegerx軸の位置
        content[].advancedOptions.imageOverlay.position.yIntegery軸の位置
        content[].advancedOptions.imageOverlay.sizeObejct挿入する画像サイズの設定
        content[].advancedOptions.imageOverlay.size.widthInteger画像の幅
        content[].advancedOptions.imageOverlay.size.heightInteger画像の高さ

        リクエスト例

        PUT https://vodstation.apigw.ntruss.com/api/v2/category/10095/add-files
        
        PUT /api/v2/category/10095/add-files
        HOST: vodstation.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==
        
        {
          "bucketName": "vs-input",
          "pathList": [
            "SampleVideo_1280x720_5mb.mp4", "/1-path/SampleVideo_1920x1080_5m.mp4"
          ]
        }
        HTTP

        レスポンス例

        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": [
            {
              "id": 10240,
              "bucketName": "vs-input",
              "filePath": "SampleVideo_1280x720_5mb.mp4",
              "status": "WAITING"
            },
            {
              "id": 10241,
              "bucketName": "vs-input",
              "filePath": "/1-path/SampleVideo_1920x1080_5m.mp4",
              "status": "WAITING"
            }
          ]
        }
        HTTP

        この記事は役に立ちましたか?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.