识别记录
查询、下载现场抓拍与证件头像。
识别记录列表
POST
/RecognizeRecord/list
Base: http://<设备IP>:18081
Body
| 字段 | 类型 | 默认 | 说明 |
|---|---|---|---|
page | number | 1 | 页码,从 1 起 |
page_size | number | 50 | 每页条数,最大 500 |
record_type | string | — | 不传=全部;whitelist / blacklist / stranger |
person_id | string | — | 按人员标识过滤 |
time_from | number | — | 起始时间(毫秒) |
time_to | number | — | 结束时间(毫秒) |
响应
{
"ok": true,
"data": {
"total": 13,
"page": 1,
"page_size": 50,
"list": [
{
"id": 13,
"person_id": "p_demo_001",
"name": "张三",
"department": "",
"weigen_no": "",
"id_card": "110101199001011234",
"record_type": "whitelist",
"score": 0.64,
"create_time": 1792126234403,
"has_photo": true,
"photo_url": "/RecognizeRecord/photo?id=13",
"has_id_photo": true,
"id_photo_url": "/RecognizeRecord/id_photo?id=13"
}
]
}
}
| 字段 | 类型 | 说明 |
|---|---|---|
total | number | 总条数 |
page | number | 当前页 |
page_size | number | 每页大小 |
list[].id | number | 记录 ID |
list[].record_type | string | whitelist / blacklist / stranger |
list[].person_id | string | 平台人员 ID;陌生人常为空串 |
list[].name | string | 姓名 |
list[].department | string | 部门 |
list[].weigen_no | string | 韦根号(若有) |
list[].id_card | string | 身份证号;无则空串 |
list[].score | number | 识别分数 |
list[].create_time | number | 时间(毫秒) |
list[].has_photo | boolean | 是否有现场抓拍 |
list[].photo_url | string | /RecognizeRecord/photo?id=<id> |
list[].has_id_photo | boolean | 是否有证件头像 |
list[].id_photo_url | string | /RecognizeRecord/id_photo?id=<id>;无证件头像为空串 |
列表用 URL 取图;上行识别回调用 base64(photo_base64 / id_photo_base64)。回调里 person_id 为设备本地数字 ID,与列表中的平台字符串 ID 不同。
示例
curl -X POST "http://192.168.1.100:18081/RecognizeRecord/list" \
-H "Authorization: Bearer ${TOKEN}" \
-F "page=1" \
-F "page_size=20" \
-F "record_type=whitelist"
识别抓拍图
GET
/RecognizeRecord/photo?id=<id>
Base: http://<设备IP>:18081
Query
| 参数 | 必填 | 说明 |
|---|---|---|
id | 必填 | 识别记录 ID |
示例
curl -G "http://192.168.1.100:18081/RecognizeRecord/photo" \
-H "Authorization: Bearer ${TOKEN}" \
--data-urlencode "id=13" \
-o capture_13.jpg
证件头像
GET
/RecognizeRecord/id_photo?id=<id>
Base: http://<设备IP>:18081
返回证件头像 JPEG。无证件头像时返回 404。
示例
curl -G "http://192.168.1.100:18081/RecognizeRecord/id_photo" \
-H "Authorization: Bearer ${TOKEN}" \
--data-urlencode "id=13" \
-o id_photo_13.jpg
清空识别记录
POST
/RecognizeRecord/clear
Base: http://<设备IP>:18081
清空全部识别记录及抓拍图。
此操作不可恢复,请确认后再调用。
Body
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
confirm | string | 必填 | 必须为 YES |
响应
{ "ok": true, "data": { "cleared": true } }
示例
curl -X POST "http://192.168.1.100:18081/RecognizeRecord/clear" \
-H "Authorization: Bearer ${TOKEN}" \
-F "confirm=YES"