detection.counting.region(获取客流区域属性)
detection.counting.region:获取客流区域属性
detection.counting.region · 通道级 · 权限 Config
功能详情
读这路通道的客流区域。最多 100 条;每条须含 id(区域 ID)、boundaryPoints(边界点坐标串)、name、type、points、direction、rule(字段含义见下方返回表)。
请求地址
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.property.get
最小权限
管理员操作自己绑定的设备不需要权限。操作被分享设备需要基础配置权限。子用户绑定不需要。子账号需要 Config。通道级漏 channelId 返回 DV2007。设备和通道写在同一次请求里返回 DV2008。
传入参数说明
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
token | String | 是 | 管理员、子用户或子账号 accessToken |
deviceId | String | 是 | 设备序列号 |
productId | String | 否 | 可省略。传了且与该设备实际型号不一致 → DV2009 |
channelId | String | 是 | 通道号,IPC 常见 "0" |
properties | Array | 是 | ["detection.counting.region"] |
样例输入
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system": {
"ver": "1.0",
"appId": "lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time": 1706511734,
"nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
},
"params": {
"token": "<yourAccessToken>",
"deviceId": "TESTIPC000012345",
"channelId": "0",
"properties": [
"detection.counting.region"
]
}
}
返回 data 字段说明
值在 result.data.properties["detection.counting.region"]。
数组上限 100。
| 参数名 | 说明 | 类型 | 必填 | 取值 |
|---|---|---|---|---|
item.name | 名称。 | text | 是 | 字符串 |
item.type | 区域类型。 | enum | 是 | 0 客流区域 |
item.points | 区域位置。坐标串,格式由设备/物模型定义。 | text | 是 | 字符串 |
item.direction | 方向。0 A->B,1 B->A。 | enum | 是 | 0 A->B;1 B->A |
item.rule | 规则。 | enum | 是 | 0 进入;1 出去;2 进入&出去 |
item.boundaryPoints | 边界点(示例:[5,5,5,5])。 | text | 是 | 字符串 |
item.id | 区域ID。范围 0~999999,步长 1。 | int | 是 | 0~999999,步长 1 |
样例输出
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"code": "0",
"msg": "Operation is successful",
"data": {
"properties": {
"detection.counting.region": [
{
"name": "example",
"type": "0",
"points": "[0,0,100,0,100,100,0,100]",
"direction": "0",
"rule": "0",
"boundaryPoints": "[0,0,100,0,100,100,0,100]",
"id": 0
}
]
}
}
}
}
错误码
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
SN1001 | 签名校验异常 | 按 HTTP 开发规范 核对 sign |
TK1002 | token 无效或过期 | 重新获取 accessToken |
OP1002 | 缺少必填参数 | 补必填字段 |
OP1003 | 参数不合法 | 按本页参数表核对 |
OP1009 | 权限不足 | 核对 token 与设备绑定/分享权限 |
OP1013 | 接口总次数超限 | 降低调用频率 |
OP1014 | 接口日限额超限 | 见 接口调用限额 |
DV1007 | 设备离线 | 等设备上线 |
更多见 错误码 · OP/SN/TK。
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
DV2003 | 设备未声明该属性 | 以 device.capability.list 为准 |
DV2004 | 写入值超出型号范围 | 核对 properties 取值 |
DV2007 | channelId 与 scope 不符 | 通道级必传,设备级不传 |
DV2008 | 同请求混用设备级与通道级 | 拆分请求 |
DV2009 | productId 与型号不一致 | 省略或改为实际型号 |
更多见 能力错误码。
