获取车流量和人流量统计结果
更新时间:2021-06-24
接口描述
本接口用于查询动态人流量/车流量统计信息结果
请求(Request)
请求URI
GET /v1/app/{appId}/dynamic/recording?aiType={aiType}&begin={begin}&end={end}&deviceId={deviceId}
参数名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
appId | Long | 是 | 应用ID |
请求头域
除公共头域外,无其它特殊头域。
请求体
参数名称 | 类型 | 是否必填 | 描述 |
---|---|---|---|
deviceId | Long | 是 | RTMP设备ID/GB28181通道ID |
aiType | String | 是 | AI检测类型,004动态人流/005 动态车流 |
begin | Integer | 是 | 录像开始时间,Unix时间戳,单位秒,形如"1617261115" |
end | Integer | 是 | 录像结束时间,Unix时间戳,单位秒,形如"1617261132" |
vehicleActions | List | 否 | 进入区域/离开区域/当前区域: in/out/current(不填写代表查询全部) |
vehicleTypes | List | 否 | 车辆类型: car/bus/motorbike/tricycle/truck (不填写代表查询全部) |
响应(Response)
响应头域
除公共头域外,无其它特殊头域。
响应体
参数名称 | 类型 | 描述 |
---|---|---|
deviceId | Long | RTMP设备ID/GB28181通道ID |
appId | Long | 应用ID |
deviceStatus | String | 设备当前状态,RUNING:正常运行状态;OPERATING:空间资源操作中,不可正常使用;STOPPED:空间已停用 |
itemData | Array | 信息列表 |
+in | Array | 进入当前图框人流/车流统计信息 |
++itemCount | Integer | 当前时间段内人流/车流 统计总数 |
++bus | Integer | 当前时间段 bus 类型车辆 统计总数(统计车流量信息时显示此项) |
++car | Integer | 当前时间段 car 类型车辆 统计总数 (统计车流量信息时显示此项) |
++motorbike | Integer | 当前时间段 motorbike 类型车辆 统计总数 (统计车流量信息时显示此项) |
++tricycle | Integer | 当前时间段 tricycle 类型车辆 统计总数 (统计车流量信息时显示此项) |
++truck | Integer | 当前时间段 truck 类型车辆 统计总数 (统计车流量信息时显示此项) |
++human | Integer | 当前时间段人流统计总数 (统计人流量信息时显示此项) |
+out | Array | 离开图框人流/车流统计信息 |
+current | Array | 当前图框总计人流/车流统计信息 |
out和current详细信息同 in属性相同
示例
请求示例
Plain Text
1GET /v1/app/app-bdpwmk3san44vt3z/dynamic/recording?aiType=005&begin=1621445899&end=1621532299&deviceId=1000007&vehicleActions=in,out&vehicleTypes=car,bus HTTP/1.1
2x-bce-date: 2020-03-25T09:28:13Z
3host: evs.bj.baidubce.com
4content-type: application/json
5authorization: bce-auth-v1/e8e4a9ced6794355a9a1b8a20b58d37b/2020-03-25T09:28:13Z/1800/content-type;hostx-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应示例
Plain Text
1车流量 统计信息示例
2HTTP/1.1 200 OK
3Transfer-Encoding: chunked
4x-bce-request-id: 012b9747-f13a-4a2c-a488-02b221844dca
5Cache-Control: no-cache
6Server: BWS
7Date: Tue, 24 Mar 202 013:34:07 GMT
8Content-Type: application/json;charset=UTF-8
9
10{
11 "deviceId": 1000007,
12 "deviceName": "testApp/testStream",
13 "deviceStatus": "ONLINE",
14 "appId": "app-bdpwmk3san44vt3z",
15 "itemData": {
16 "in": [
17 {
18 "itemCount": 22,
19 "captureTime": "2021-05-20T09:11:54.996+0000",
20 "bus": 1,
21 "car": 3,
22 "motorbike": 6,
23 "tricycle": 12,
24 "truck": 0
25 }
26 ],
27 "out": [
28 {
29 "itemCount": 134,
30 "captureTime": "2021-05-20T09:11:54.996+0000",
31 "bus": 2,
32 "car": 4,
33 "motorbike": 9,
34 "tricycle": 20,
35 "truck": 99
36 }
37 ],
38 "current": [
39 {
40 "itemCount": 3,
41 "captureTime": "2021-05-20T09:11:54.996+0000",
42 "bus": 1,
43 "car": 1,
44 "motorbike": 0,
45 "tricycle": 0,
46 "truck": 1
47 }
48 ]
49 }
50}
51人流量 统计信息示例
52HTTP/1.1 200 OK
53Transfer-Encoding: chunked
54x-bce-request-id: 012b9747-f13a-4a2c-a488-02b221844dca
55Cache-Control: no-cache
56Server: BWS
57Date: Tue, 24 Mar 202 013:34:07 GMT
58Content-Type: application/json;charset=UTF-8
59
60{
61 "deviceId": 1001460,
62 "deviceName": "testApp/testStream111",
63 "deviceStatus": "ONLINE",
64 "appId": "app-bdpwmk3san44vt3z",
65 "itemData": {
66 "in": [
67 {
68 "itemCount": 2,
69 "captureTime": "2021-05-30T02:45:19.000+0000",
70 "human": 2
71 }
72 ],
73 "out": [
74 {
75 "itemCount": 1,
76 "captureTime": "2021-05-30T02:45:19.000+0000",
77 "human": 1
78 }
79 ],
80 "current": [
81 {
82 "itemCount": 10,
83 "captureTime": "2021-05-30T02:45:19.000+0000",
84 "human": 10
85 }
86 ]
87 }
88}
错误码
错误码(code) | 消息(message) | 描述 | HTTP状态码 |
---|---|---|---|
AppTypeNotApplicable | app type not applicable with : XXX | 查询的app类型不存在 | 400 |
NoSuchDevice | no such device, device id : XXX | 设备不存在 | 404 |
参考公共错误码