查询AI分析结果告警

最近更新时间:2026-03-19 18:16:28

天翼云智能视图服务API

1.查询AI分析结果告警

接口功能介绍

本接口用于查询AI分析结果告警,支持查询30天内的结果告警,单次查询最长时间跨度为7天。

接口约束

URI

GET /ai/results

路径参数

Query参数

参数是否必填参数类型说明示例下级对象
AppIdInteger应用ID。3238848
AlgorithmsIdString算法ID。2
DeviceIdString设备ID。32388487739092996
ConfidenceMinDouble置信区间下限,置信度区间参数取值为0.0~1.0。0
ConfidenceMaxDouble置信区间上限,置信度区间参数取值为0.0~1.0。1.0
StartTimeInteger开始时间,秒级时间戳,默认为查询当日00:00:00。1638892800
EndTimeInteger结束时间,秒级时间戳。1638979199
PageNumInteger第几个分页,默认为1。1
PageSizeInteger分页大小,默认为20。取值范围为1~1000。10

请求参数

请求头header参数

参数是否必填参数类型说明示例下级对象
AuthorizationString认证信息。CT-HMAC-SHA256 Credential=FQ01GA2RR9IJFM1PWIPR/2023-07-18/vss, SignedHeaders=content-type;host;timestamp, Signature=c6e72dffcfb2d25d276e119781e1deb6656d966702191b2bd862d1691e39394f
Content-TypeString互联网媒体类型。application/json;charset=utf-8
HostString主机。vssapi.ctyun.cn
VersionString版本。2021-11-25
TimestampString时间戳。1689643309

请求体body参数

响应参数

参数参数类型说明示例下级对象
statusCodeInteger响应状态码。200
errorString错误码,执行成功时,不返回该字段。VSS_0001
messageString响应信息。请求成功
requestIdString请求ID。3176a1485a57493d896fdc90ffdeb774
returnObjObject响应数据。returnObj

表 returnObj

参数参数类型说明示例下级对象
AnalysisResultsArray of Objects返回结果。AnalysisResult
PageNumInteger第几个分页。1
PageSizeInteger分页大小。10
TotalPageInteger分页总数。1
TotalNumInteger应用总数。10
RequestIdString请求ID。362d4e78556b47129182d0881fade86b

表 AnalysisResult

参数参数类型说明示例下级对象
CaptureTimeInteger截图时间,Unix时间戳,精确到秒。1689643309
AppIDInteger应用ID。2123
AppNameString应用名称。应用名称
AlgorithmsIdInteger算法Id。4
AlgoNameString算法名称。吸烟检测
DeviceIDString设备ID。32388487739092996
DeviceNameString设备名称。设备1
ConfidenceDouble置信度。0.9
ImageString告警图片URL。http://example.ctyun.cn/example
ImageThumbnailString告警图片缩略图URL。http://example.ctyun.cn/example
DetectBoxesArray of Integers检测目标框坐标集合。[2, 3, 4, 5]
OcrBoxesArray of IntegersOCR识别目标框坐标集合,比如车牌识别。[2, 3, 4, 5, 6, 7, 8, 9]
DetectScoresArray of Floats检测目标置信度集合。[0.9]
DetectClsesArray of Strings检测目标分类,可参考回调事件中的AI事件字段说明。["0"]
DetectClsesChnArray of Strings检测目标分类中文展示。["未戴安全帽"]
BoxLabelsArray 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"
  }
}

状态码

请参考状态码说明。

错误码

请参考错误码说明。