此接口支持通过 TemplateId
模板 ID,获取任务模板的列表信息。
参数 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Action | String | 是 | 接口名称。当前接口取值为 ListTaskTemplate 。 |
Version | String | 是 | 接口版本。当前接口取值为 2023-07-01 。 |
SpaceName | String | 否 | 点播空间名称。可通过以下方式获取空间名称: |
TemplateId | String | 否 | 模板 ID。 |
Name | String | 否 | 模板名称。 |
TaskType | String | 否 | 任务模板类型,多个值通过 , 连接。 |
Limit | int32 | 否 | 返回个数。取值范围为 (0,100]。默认为 30。 |
Offset | int32 | 否 | 偏移量。需大于等于 0。 |
OrderByKey | String | 否 | 排序 key。取值如下:
|
Order | String | 否 | 顺序。取值如下:
|
参数 | 类型 | 描述 |
---|---|---|
ResponseMetadata | ResponseMetadata | 响应通用信息 |
Result | VodListTaskTemplateResult | 响应结果 |
参数 | 类型 | 描述 |
---|---|---|
RequestId | String | 请求 ID |
Action | String | 请求接口 |
Version | String | 版本 |
Service | String | 服务 |
Region | String | 区域 |
Error | ResponseError | 异常信息 |
参数 | 类型 | 描述 |
---|---|---|
Code | String | 错误码 |
Message | String | 详细错误信息 |
参数 | 类型 | 描述 |
---|---|---|
Limit | int32 | 返回个数。 |
Offset | int32 | 偏移量。 |
Total | int64(Json 中为 String) | 模板总数。 |
Data | Array of TaskTemplate | 模板信息。 |
参数 | 类型 | 描述 |
---|---|---|
TemplateId | String | 模板 ID |
SpaceName | String | 空间名称 |
Name | String | 模板名称 |
Description | String | 模板描述 |
CommitId | String | 版本 ID |
Hash | String | 哈希 |
CreatedAt | Timestamp | 创建时间。 |
UpdatedAt | Timestamp | 更新时间。 |
TaskType | String | 任务类型 |
TranscodeVideoTaskParams | TranscodeVideoTaskParams | 视频转码模板 |
ByteHDTaskParams | ByteHDTaskParams | 极智超清模板 |
TranscodeAudioTaskParams | TranscodeAudioTaskParams | 音频转码模板 |
SnapshotTaskParams | SnapshotTaskParams | 截图模板 |
https://vod.volcengineapi.com?Action=ListTaskTemplate&Version=2023-07-01&SpaceName=YourSpaceName&TemplateId=YourTemplateId&Name=YourName&TaskType=YourTaskType&Limit=YourLimit&Offset=YourOffset&OrderByKey=YourOrderByKey&Order=YourOrder
{ "ResponseMetadata": { "RequestId": "20220726*******************051B513A", "Action": "ListTaskTemplate", "Version": "2023-07-01", "Service": "vod", "Region": "cn-north-1" }, "Result": { "Limit": 1, "Offset": 1, "Total": "Total", "Data": [{ "TemplateId": "TemplateId", "SpaceName": "SpaceName", "Name": "Name", "Description": "Description", "CommitId": "CommitId", "Hash": "Hash", "CreatedAt": "2022-04-18T20:00:00Z", "UpdatedAt": "2022-04-18T22:00:00Z", "TaskType": "TaskType", "TranscodeVideoTaskParams": { "TranscodeTemplateType": "TranscodeTemplateType", "Container": "Container", "Video": { "Res": "Res", "ScaleMethod": "ScaleMethod", "ScaleType": 1, "ScaleMode": 1, "ScaleWidth": 1, "ScaleHeight": 1, "ScaleShort": 1, "ScaleLong": 1, "Codec": "Codec", "RateControlMode": "RateControlMode", "MaxBitrate": 1, "Bitrate": 1, "Crf": 0.1, "Preset": "Preset", "MaxFps": 1, "Vsync": "Vsync", "Fps": 0.1 "HDRMode": 0 }, "Audio": { "Codec": "Codec", "SampleRate": 1, "RateControlMode": "RateControlMode", "Bitrate": 1, "MinRate": 1, "MaxRate": 1, "Channels": 1, "Profile": "Profile" }, "DisableAudio": "false", "Quality": "Quality", "UserTag": "UserTag", "Encrypt": "false", "Encryption": { "Vendor": "Vendor" }, "Segment": { "Format": "Format", "Type": "Type", "Duration": 1 } }, "ByteHDTaskParams": { "Container": "Container", "Video": { "Res": "Res", "ScaleMethod": "ScaleMethod", "ScaleType": 1, "ScaleMode": 1, "ScaleWidth": 1, "ScaleHeight": 1, "ScaleShort": 1, "ScaleLong": 1, "Codec": "Codec", "RateControlMode": "RateControlMode", "MaxBitrate": 1, "Bitrate": 1, "Crf": 0.1, "Preset": "Preset", "MaxFps": 1, "Vsync": "Vsync", "Fps": 0.1, "HDRMode": 0 }, "Audio": { "Codec": "Codec", "SampleRate": 1, "RateControlMode": "RateControlMode", "Bitrate": 1, "MinRate": 1, "MaxRate": 1, "Channels": 1, "Profile": "Profile" }, "DisableAudio": "false", "Quality": "Quality", "UserTag": "UserTag", "Encrypt": "false", "Encryption": { "Vendor": "Vendor" }, "Segment": { "Format": "Format", "Type": "Type", "Duration": 1 } }, "TranscodeAudioTaskParams": { "Container": "Container", "Audio": { "Codec": "Codec", "SampleRate": 1, "RateControlMode": "RateControlMode", "Bitrate": 1, "MinRate": 1, "MaxRate": 1, "Channels": 1, "Profile": "Profile" }, "Quality": "Quality", "UserTag": "UserTag", "Encrypt": "false", "Encryption": { "Vendor": "Vendor" }, "Segment": { "Format": "Format", "Type": "Type", "Duration": 1 } } } ] } }
{ "ResponseMetadata": { "RequestId": "20220726*******************051B513A", "Action": "ListTaskTemplate", "Version": "2023-07-01", "Service": "vod", "Region": "cn-north-1", "Error": { "Code": "InternalError", "Message": "InternalError:some error!" } } }
详见视频点播公共错误码。
点播 OpenAPI 提供了配套的服务端 SDK,支持多种编程语言,帮助您实现快速开发。建议使用服务端 SDK 来调用 API,此 API 各语言调用的示例代码,请参考如下: