HTTP - API
AI
说明:
- 所有请求均为AI服务器向业务服务器发起HTTP请求
- 所有请求均为post请求
- 入参为JSON格式的字符串
- 出参为JSON格式
获取设备列表(device/useByAi/search)
入参
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 时间戳 |
timestamp |
string |
|
Y |
不传默认返回所有设备 |
出参
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 设备数据时间戳 |
timestamp |
string |
|
N |
|
| 设备列表 |
content |
array |
|
N |
参考下面content内部字段 |
content内部字段
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 设备id |
id |
number |
|
N |
设备的id |
| 商户id |
merchant_id |
string |
|
N |
|
| 设备号 |
code |
string |
|
N |
如live/mrzs |
| 设备名称 |
name |
string |
|
N |
如 二楼拐角 |
| 设备地面特征值 |
ground_eigen_value |
string |
|
N |
|
使用示例
// 网页端引入jquery后的api调用示例$.ajax({ url:'https://www.aicaresyou.com/api/device/useByAi/search', type:'post', contentType: "application/json;charset=UTF-8", data:JSON.stringify({ timestamp:'1618281386901' }), dataType:'json', success:function(res){ console.log('success',res) // 出参res 如下 { code:0, data:{ timestamp:'1618281386902', content:[ { id:1, merchant_id:1, code:'live/mrzs', name:'二楼拐角', ground_eigen_value:'' } ] } } }, error:function(res){ console.log('err',res) }})
获取人脸列表(face/useByAi/search)
入参
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 时间戳 |
timestamp |
string |
|
Y |
不传默认返回所有设备 |
出参
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 人脸数据时间戳 |
timestamp |
string |
|
N |
|
| 人脸列表 |
content |
array |
|
N |
参考下面content内部字段 |
content内部字段
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| id |
id |
number |
|
N |
人脸的id |
| 商户id |
merchant_id |
string |
|
N |
|
| 人脸特征值 |
face_eigen_value |
string |
|
N |
|
使用示例
// 网页端引入jquery后的api调用示例$.ajax({ url:'https://www.aicaresyou.com/api/face/useByAi/search', type:'post', contentType: "application/json;charset=UTF-8", data:JSON.stringify({ timestamp:'1618281386901' }), dataType:'json', success:function(res){ console.log('success',res) // 出参res 如下 { code:0, data:{ timestamp:'1618281386902', content:[ { id:1, merchant_id:1, face_eigen_value:'...' } ] } } }, error:function(res){ console.log('err',res) }})
推送设备报警数据(alarmEvent/push)
入参
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 设备ID |
device_id |
number |
|
N |
通过device/useByAi/search获取到的设备id |
| 人脸ID |
face_id |
number |
|
Y |
通过face/useByAi/search获取到的人脸id |
| 指标 |
index_name |
string |
|
N |
如 跌倒、吃饭、喝水等,需要提供全部的指标 |
| 指标值 |
index_value |
boolean |
|
N |
true代表发生,false代表结束 |
| 发生时间 |
index_time |
date |
|
N |
|
| 视频片段 |
video_url |
string |
|
Y |
跌倒发生前后的视频片段 |
使用示例
// 网页端引入jquery后的api调用示例$.ajax({ url:'https://www.aicaresyou.com/api/alarmEvent/push', type:'post', contentType: "application/json;charset=UTF-8", data:JSON.stringify({ device_id:1, face_id:1, index_time:'2021-01-01 12:00:00', index_name:'跌倒', index_value:true, video_url:'' }), dataType:'json', success:function(res){ console.log('success',res) // 出参res 如下 { code:0 } }, error:function(res){ console.log('err',res) }})
发送人脸特征值数据(face/eigenValue/send)
入参
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 设备ID |
device_id |
number |
|
N |
|
| 人脸ID |
face_id |
number |
|
N |
|
| 人脸特征值 |
face_eigen_value |
string |
|
N |
|
使用示例
// 网页端引入jquery后的api调用示例$.ajax({ url:'https://www.aicaresyou.com/api/face/eigenValue/send', type:'post', contentType: "application/json;charset=UTF-8", data:JSON.stringify({ device_id:1, face_id:1, face_eigen_value:'' }), dataType:'json', success:function(res){ console.log('success',res) // 出参res 如下 { code:0 } }, error:function(res){ console.log('err',res) }})
发送地面特征值数据(device/groundEigenValue/send)
入参
| 名称 |
编码 |
类型 |
值 |
允许NULL |
说明 |
| 设备id |
device_id |
number |
|
N |
|
| 地面特征值参数内容 |
ground_eigen_value |
string |
|
Y |
当doneStatus值为0时,返回该数据 |
| 录制状态 |
status |
number |
|
N |
0:全部完成。1:本次录入完成,录制下一个。2:本次录入失败,重新录入 |
使用示例
// 网页端引入jquery后的api调用示例$.ajax({ url:'https://www.aicaresyou.com/api/device/groundEigenValue/send', type:'post', contentType: "application/json;charset=UTF-8", data:JSON.stringify({ device_id:1, ground_eigen_value:'', status:1 }), dataType:'json', success:function(res){ console.log('success',res) // 出参res 如下 { code:0 } }, error:function(res){ console.log('err',res) }})