查询AI分析结果告警
最近更新时间:2026-03-19 18:16:28
天翼云智能视图服务API
1.查询AI分析结果告警
接口功能介绍
本接口用于查询AI分析结果告警,支持查询30天内的结果告警,单次查询最长时间跨度为7天。
接口约束
无
URI
GET /ai/results
路径参数 无
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| AppId | 否 | Integer | 应用ID。 | 3238848 | |
| AlgorithmsId | 是 | String | 算法ID。 | 2 | |
| DeviceId | 否 | String | 设备ID。 | 32388487739092996 | |
| ConfidenceMin | 否 | Double | 置信区间下限,置信度区间参数取值为0.0~1.0。 | 0 | |
| ConfidenceMax | 否 | Double | 置信区间上限,置信度区间参数取值为0.0~1.0。 | 1.0 | |
| StartTime | 否 | Integer | 开始时间,秒级时间戳,默认为查询当日00:00:00。 | 1638892800 | |
| EndTime | 否 | Integer | 结束时间,秒级时间戳。 | 1638979199 | |
| PageNum | 否 | Integer | 第几个分页,默认为1。 | 1 | |
| PageSize | 否 | Integer | 分页大小,默认为20。取值范围为1~1000。 | 10 |
请求参数
请求头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参数
无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 响应状态码。 | 200 | |
| error | String | 错误码,执行成功时,不返回该字段。 | VSS_0001 | |
| message | String | 响应信息。 | 请求成功 | |
| requestId | String | 请求ID。 | 3176a1485a57493d896fdc90ffdeb774 | |
| returnObj | Object | 响应数据。 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| AnalysisResults | Array of Objects | 返回结果。 | AnalysisResult | |
| PageNum | Integer | 第几个分页。 | 1 | |
| PageSize | Integer | 分页大小。 | 10 | |
| TotalPage | Integer | 分页总数。 | 1 | |
| TotalNum | Integer | 应用总数。 | 10 | |
| RequestId | String | 请求ID。 | 362d4e78556b47129182d0881fade86b |
表 AnalysisResult
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| CaptureTime | Integer | 截图时间,Unix时间戳,精确到秒。 | 1689643309 | |
| AppID | Integer | 应用ID。 | 2123 | |
| AppName | String | 应用名称。 | 应用名称 | |
| AlgorithmsId | Integer | 算法Id。 | 4 | |
| AlgoName | String | 算法名称。 | 吸烟检测 | |
| DeviceID | String | 设备ID。 | 32388487739092996 | |
| DeviceName | String | 设备名称。 | 设备1 | |
| Confidence | Double | 置信度。 | 0.9 | |
| Image | String | 告警图片URL。 | http://example.ctyun.cn/example | |
| ImageThumbnail | String | 告警图片缩略图URL。 | http://example.ctyun.cn/example | |
| DetectBoxes | Array of Integers | 检测目标框坐标集合。 | [2, 3, 4, 5] | |
| OcrBoxes | Array of Integers | OCR识别目标框坐标集合,比如车牌识别。 | [2, 3, 4, 5, 6, 7, 8, 9] | |
| DetectScores | Array of Floats | 检测目标置信度集合。 | [0.9] | |
| DetectClses | Array of Strings | 检测目标分类,可参考回调事件中的AI事件字段说明。 | ["0"] | |
| DetectClsesChn | Array of Strings | 检测目标分类中文展示。 | ["未戴安全帽"] | |
| BoxLabels | Array of Strings | 检测目标边界框的Label展示。 | [] |
请求示例
请求url
GET '/ai/results'
请求头header
{
"Authorization": "CT-HMAC-SHA256 Credential=1R9M5WFHWV25TQPD54XL/2023-11-03/vss, SignedHeaders=content-type;host;timestamp, Signature=2eda70fa6f4b24bc4eef457733ab1ffd4af5b1c15721d59d544c21dd5e137903",
"Content-Type": "application/json;charset=utf-8",
"Host": "vssapi.ctyun.cn",
"Version": "2021-11-25",
"Timestamp": "1699003745"
}
请求体body 无
响应示例
{
"statusCode": 200,
"message": "请求成功",
"requestId": "3176a1485a57493d896fdc90ffdeb774",
"returnObj": {
"AnalysisResults": [
{
"captureTime": 1698827980,
"appID": 5420000,
"algorithmsId": 4,
"algoName": "入侵检测",
"deviceID": "858124595986497536",
"deviceName": "测试设备",
"confidence": 1,
"image": "http://example.ctyun.cn/example",
"imageThumbnail": "http://example.ctyun.cn/example",
"dangerZone": ["14", "14", "82", "14", "82", "69", "14", "69"],
"detectBoxes": [256, 199, 145, 192],
"ocrBoxes": [],
"detectScores": [],
"detectClses": [],
"detectClsesChn": [],
"detectOthersInfo": [],
"boxLabels": [
{
"info": {
"置信度": "99.99",
"陌生人": ""
}
}
],
"imageLabel": {},
"attributesLabel": [],
"othersInfo": {}
}
],
"PageNum": 1,
"PageSize": 10,
"TotalPage": 1,
"TotalNum": 20,
"RequestId": "3176a1485a57493d896fdc90ffdeb774"
}
}
状态码
请参考状态码说明。
错误码
请参考错误码说明。
本页目录: