创建webhook,在翻译、配音达到特定节点的时候调用该接口
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | WebhooksCreate | 要执行的操作,取值:WebhooksCreate。 |
Version | String | 是 | 2021-05-21 | API的版本,取值:2021-05-21。 |
hookIds | Array of Integer | 是 | [37, 38] | hooksIds,当流程达到这些节点的时候会给配置的url发送post请求; |
name | String | 是 | 创建任务的hooks | hook的名称 |
type | String | 是 | 用于判断给什么类型的项目创建,视频类型传值为 video | { |
projectId | String | 是 | 10450295321856 | 项目id |
url | String | 是 | https://yoururl.com/api | webhook回调地址。,注意是post请求。 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
message | String | success | 接口返回信息 |
POST /?Action=WebhooksCreate&Version=2021-05-21&name=bbEa&projectId=RiWjIbUbn&url=Jhw HTTP/1.1 Host: open.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20251108T103237Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251108/cn-beijing/i18n_openapi/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "hookIds": [ 0 ], "type": "用于判断给什么类型的项目创建,视频类型传值为 video" }
{ "ResponseMetadata": { "RequestId": "202511081832430480351340531884B8", "Action": "WebhooksCreate", "Version": "2021-05-21", "Service": "i18n_openapi", "Region": "cn-beijing" }, "Result": { "message": "DvS" } }
您可访问公共错误码,获取更多错误码信息。
// video.task.created 示例 {"event":"video.task.created", "projectId":"26573440770", "operator":"2100332519", "timestamp":1764145716380, "operationType":0, "type":2, "taskId":"26800504322"} // video.task.finished 示例 { "event": "video.task.finished", "projectId": "25949905666", "operator": "2100332519", "timestamp": 1763703132450, "operationType": 0, "type": 2, "taskId": "25949874946", "subtasks": [ { "subtaskId": 25949876226, "episodeNum": 1, "suppressionVideoUrl": "xxxxx" }, { "subtaskId": 25949876482, "episodeNum": 2, "suppressionVideoUrl": "xxxxx" } ] } //video.subtask.product.updated 返回示例 { "event": "video.subtask.product.updated", "projectId": "331325223170", "operator": "67132380", "timestamp": 1784192090181, "operationType": 0, // 操作类型,系统平台触发时为 0 "type": 2, // 消息分类,视频类固定为 2 "taskId": 331325223682, "taskType": 4, "taskStatus": 2, "subtaskId": 331325227522, "subtaskType": 2, "subtaskStatus": 3, "episodeNum": 3, "processType": 2, // 产物所属流程类型,2 表示 target_process "processId": 24801748, "productType": 4, // 更新的产物类型:2 表示argetSubtitles(译文字幕);4 表示FinishedVideo(成品视频);5 表示FinishedAudio(成品音频) "msg": "子任务产物更新" } // video.term.translate.finished 返回示例 { "event": "video.term.translate.finished", "project_id": 387157295106, "operatorName": "wangmengyu.03", "timestamp": 1785501210336, "operationType": 0, // 操作类型,系统平台触发时为 0 "type": 2, // 消息分类,视频类固定为 2 "msg": "术语翻译已完成" }