修改回调模板
最近更新时间:2026-03-19 18:16:28
天翼云智能视图服务API
1.修改回调模板
接口功能介绍
本接口用于修改回调模板。
接口约束
url会进行批量修改,未传参的url将被置空。
URI
PUT /callbackTemplate/{TemplateId}
路径参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| TemplateId | 是 | String | 模板ID。 | 739943519892963328 |
Query参数
无
请求参数
请求头header参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| Authorization | 是 | String | 认证信息。 | CT-HMAC-SHA256 Credential=FQ01GA2RR9IJFM1PWIPR/2023-07-18/vss, SignedHeaders=content-type;host;timestamp, Signature=c6e72dffcfb2d25d276e119781e1deb6656d966702191b2bd862d1691e39394f | |
| Content-Type | 是 | String | 互联网媒体类型。 | application/json;charset=utf-8 | |
| Host | 是 | String | 主机。 | vssapi.ctyun.cn | |
| Version | 是 | String | 版本。 | 2021-11-25 | |
| Timestamp | 是 | String | 时间戳。 | 1689643309 |
请求体body参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| Description | 否 | String | 模板描述,长度小于等于256个字符。 | 回调模板 | |
| CallbackKey | 是 | String | 回调Key。 | abc123 | |
| DeviceStatusNotifyUrl | 否 | String | 设备状态回调URL。DeviceStatusNotifyUrl,StreamStatusNotifyUrl,RecordNotifyUrl,SnapshotNotifyUrl,AiEventNotifyUrl至少选择一种。 | http://example.ctyun.cn/example | |
| StreamStatusNotifyUrl | 否 | String | 流状态回调URL。DeviceStatusNotifyUrl,StreamStatusNotifyUrl,RecordNotifyUrl,SnapshotNotifyUrl,AiEventNotifyUrl至少选择一种。 | http://example.ctyun.cn/example | |
| RecordNotifyUrl | 否 | String | 录制回调URL。DeviceStatusNotifyUrl,StreamStatusNotifyUrl,RecordNotifyUrl,SnapshotNotifyUrl,AiEventNotifyUrl至少选择一种。 | http://example.ctyun.cn/example | |
| AiEventNotifyUrl | 否 | String | AI回调URL。DeviceStatusNotifyUrl,StreamStatusNotifyUrl,RecordNotifyUrl,SnapshotNotifyUrl,AiEventNotifyUrl至少选择一种。 | http://example.ctyun.cn/example |
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 响应状态码。 | 200 | |
| error | String | 错误码,执行成功时,不返回该字段。 | VSS_0001 | |
| message | String | 响应信息。 | 请求成功 | |
| requestId | String | 请求ID。 | 362d4e78556b47129182d0881fade86b | |
| returnObj | Object | 响应数据,执行失败时,不返回该字段。 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| TemplateId | String | 模板ID。 | 739943519892963328 | |
| RequestId | String | 请求ID。 | 362d4e78556b47129182d0881fade86b |
请求示例
请求url
PUT '/callbackTemplate/739943519892963328'
请求头header
{
"Authorization": "CT-HMAC-SHA256 Credential=FQ01GA2RR9IJFM1PWIPR/2023-08-14/vss, SignedHeaders=content-type;host;timestamp, Signature=bc716bca3f92e5d45f5f075bb9dc69cca67191cecb2dc8327b03d68bea45dccb",
"Content-Type": "application/json;charset=utf-8",
"Host": "vssapi.ctyun.cn",
"Version": "2021-11-25",
"Timestamp": "1691993232"
}
请求体body
{
"CallbackKey": "123",
"DeviceStatusNotifyUrl": "http://example.ctyun.cn/example"
}
响应示例
{
"statusCode": 200,
"message": "请求成功",
"requestId": "18374a7365694d13837d5d69747280d6",
"returnObj": {
"TemplateId": "739943519892963328",
"RequestId": "18374a7365694d13837d5d69747280d6"
}
}
状态码
请参考状态码说明。
错误码
请参考错误码说明。
本页目录: