查询AI应用
最近更新时间:2026-03-19 18:16:28
天翼云智能视图服务API
1.查询AI应用
接口功能介绍
本接口用于查询AI应用。
接口约束
无
URI
GET /ai/apps/{AppId}
路径参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| AppId | 是 | Integer | 应用ID。 | 586 |
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| DeviceId | 否 | Integer | 查询AI应用和对应的设备ID的绑定信息。 | 743780360209498112 |
请求参数
请求头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。 | cf2ddcc0ca21435ca5fd7292aea17012 | |
| returnObj | Object | 响应数据。 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| AppId | String | 应用ID。 | 583 | |
| AppName | String | 应用名称。 | 名称 | |
| Description | String | 应用描述。 | 描述 | |
| AnalyseType | String | 分析类型,分钟级AI-100,秒级AI-200。 | AI-100 | |
| OperTimeSlot | Array of Objects | AI应用生效时间段,最多包含五组时间段。默认为全天(00:00:00-23:59:59)。 | OperTimeSlot | |
| Confidence | Double | 置信度。 | 0.8 | |
| CreateTime | String | 创建时间。 | 2023-10-18 15:09:32 | |
| UpdateTime | String | 更新时间。 | 2023-10-18 15:28:37 | |
| Algorithm | Object | 算法详情。 | Algorithm | |
| AlgorithmMetadata | Object | 算法的自定义配置项,具体可参考表AlgorithmMetadata的参数说明。 | AlgorithmMetadata | |
| AlertConfig | Object | 告警配置。 | AlertConfig |
表 Algorithm
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| AlgorithmId | String | AI算法ID。 | 2 | |
| Name | String | 算法名称。 | 吸烟检测 | |
| Summary | String | 算法概要。 | 检测图像中的所有人体,返回每个人体的位置坐标。识别人体的20余类属性信息,包含性别年龄、服饰类别、服饰颜色等。 | |
| AiAbilityId | String | 算法分类ID。 | 1 |
表 AlgorithmMetadata
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| FaceDbName | String | 人脸ID。 | 1080062 | |
| HelmetReflectiveType | Array of Strings | 安全帽反光服检测(helmet:未带安全帽告警,reflective:未穿反光服报警)。 | ["helmet","reflective"] | |
| PedThreshold | String | 行人检测(人员数量阈值)。 | 22 | |
| VehiclesThreshold | String | 车辆统计(车辆数量阈值)。 | 10 | |
| PvTime | String | 车辆违停检测(临停时间)。 | 22 | |
| JamThreshold | String | 车辆拥堵检测(拥堵车辆阈值)。 | 56 | |
| CrowdThreshold | String | 人群感应检测(人员数量阈值)。 | 21 | |
| OffDutyThreShold | String | 实时在岗检测(人脱岗超时时间)。 | 14 | |
| SleepOnDutyThreShold | String | 实时在岗检测(睡岗超时时间)。 | 12 | |
| CityGovType | Array of Strings | 城市治理-(店外经营,游摊小贩,占道经营 乱堆物料,户外广告,打包垃圾 ,暴露垃圾,沿街晾晒,违规撑伞,地桩地锁, 绿化损坏,道路破损,垃圾箱未加盖,垃圾箱满溢,气拱门,横幅识别,井盖异常)。 | ["dianwai","youtan","zhandao","wuliao","guanggao","dabaolaji","baolulaji","liangshai","chengsan","disuo","lvhuasunhuai","daoluposun","weijiagai","manyi","qimogongmeng","banner","cover"] |
表 OperTimeSlot
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| StartTime | String | 开始时间。格式为"hh:mm:ss",且StartTime必须小于EndTime。 | 08:40:00 | |
| EndTime | String | 结束时间。格式为"hh:mm:ss",且StartTime必须小于EndTime。 | 09:40:00 |
表 AlertConfig
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| AlertPeriod | String | 告警周期,检测告警信息的时间区段。 | 30 | |
| AlertTriggerThreshold | String | 告警数量阈值,检测告警信息的数量阈值。 | 5 | |
| AlertSilencePeriod | String | 静默时间。静默时间内,不产生任何的AI告警信息,告警周期内触发告警之后即进入静默期,待达到静默时间之后,重新进行新一轮的告警判断。 | 10 |
请求示例
请求url
GET '/ai/apps/635'
请求头header
{
"Authorization": "CT-HMAC-SHA256 Credential=1R9M5WFHWV25TQPD54XL/2023-11-03/vss, SignedHeaders=content-type;host;timestamp, Signature=38da40c7bef402b58d0b04855e9db769252254dbc0a7886735eec32995b129ca",
"Content-Type": "application/json;charset=utf-8",
"Host": "vssapi.ctyun.cn",
"Version": "2021-11-25",
"Timestamp": "1699002539"
}
请求体body
无
响应示例
{
"statusCode": 200,
"message": "请求成功",
"requestId": "440912cb15794393afac8fbffa510b43",
"returnObj": {
"AppId": "635",
"AppName": "test7791",
"Description": "",
"AnalyseType": "AI-100",
"OperTimeSlot": [
{
"StartTime": "00:00:00",
"EndTime": "23:59:59"
}
],
"Confidence": 0.6,
"CreateTime": "2023-12-06 14:38:36",
"UpdateTime": "2023-12-06 14:38:36",
"Algorithm": {
"AlgorithmsId": "2",
"Name": "吸烟检测",
"Summary": "检测图像中的所有人体,返回每个人体的位置坐标。识别人体的20余类属性信息,包含性别年龄、服饰类别、服饰颜色等。",
"AiAbilityId": "2"
},
"AlgorithmMetadata": {},
"AlertConfig": {
"AlertPeriod": "0",
"AlertTriggerThreshold": "0",
"AlertSilencePeriod": "0"
},
"RequestId": "440912cb15794393afac8fbffa510b43"
}
}
状态码
请参考状态码说明。
错误码
请参考错误码说明。
本页目录: