查询设备列表-Marker
更新时间:2022-02-17
接口描述
本接口用于查询用户空间下面所有的设备列表,按marker分页方式查询。
请求(Request)
请求URI
GET /v1/device?spaceId={spaceId}&marker={marker}&maxSize={maxSize}&deviceName={deviceName}&status={status}
参数名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
spaceId | Long | 是 | 所属空间ID |
marker | Long | 是 | 设备ID,marker键必须存在,但值可以为空 |
maxSize | Integer | 是 | 查询结果最大条数 |
deviceName | String | 否 | 设备名称筛选,只支持前缀模糊匹配 |
status | String | 否 | 设备当前状态,区分设备类型,RTMP设备状态包含:ONLINE(在线)/RUNNING(推流中)/OFFLINE(已封禁设备),GB28181设备状态包含:UNREGISTERED(未注册)/ONLINE(注册后)/OFFLINE(注销后) |
请求头域
除公共头域外,无其它特殊头域。
请求体
无
响应(Response)
响应头域
除公共头域外,无其它特殊头域。
响应体
参数名称 | 类型 | 描述 |
---|---|---|
marker | String | 本次查询的起点 |
nextMarker | String | 下一次查询的起点,为空表示已经返回所有结果 |
truncated | Boolean | 指明是否所有查询都返回了;false:本次已经返回所有结果,true:本次还没有返回所有结果 |
data | Array | 空间信息列表 |
+ deviceId | Long | 设备ID |
+ deviceName | String | 设备名称 |
+ spaceName | String | 空间名称 |
+ type | String | 设备类型,RTMP/GB28181 |
+ status | String | 设备状态 |
+ description | String | 设备描述 |
+ platform | String | 国标设备平台,IPC/NVR |
+ manufacturer | String | 国标设备厂商 |
+ channelCount | Integer | 国标通道个数 |
示例
请求示例
Plain Text
1GET /v1/device?spaceId=1000618&marker&maxSize=2 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;host;x-date/4a1692dc4bab84f5801f79ea0c1fece3601cf73ecd94409d2a94b3942b971715
响应示例
Plain Text
1HTTP/1.1 200 OK
2Transfer-Encoding: chunked
3x-bce-request-id: 012b9747-f13a-4a2c-a488-02b221844dca
4Cache-Control: no-cache
5Server: BWS
6Date: Tue, 24 Mar 202 013:34:07 GMT
7Content-Type: application/json;charset=UTF-8
8{
9 "data": [
10 {
11 "deviceId": 1000908,
12 "deviceName": "evs_device_name",
13 "spaceName": "evs_space_name",
14 "type": "RTMP",
15 "channelCount": 0,
16 "status": "ONLINE",
17 "description": "",
18 "deviceStreamId": "appId/streamId",
19 "domainList": [
20 {
21 "domain": "bcds9n12sumw6yp8iux.a.e-web.com.cn",
22 "type": "DOWNSTREAM",
23 "cname": "bcds9n12sumw6yp8iux.a.e-web.com.cn"
24 },
25 {
26 "domain": "bcdsnsvz5at494i9xpm.b.e-web.com.cn",
27 "type": "UPSTREAM",
28 "cname": "bcdsnsvz5at494i9xpm.b.e-web.com.cn"
29 }
30 ]
31 },
32 {
33 "deviceId": 1000762,
34 "deviceName": "evs_device_name1",
35 "spaceName": "evs_space_name",
36 "type": "RTMP",
37 "channelCount": 0,
38 "status": "ONLINE",
39 "description": "",
40 "deviceStreamId": "appId/streamId1",
41 "domainList": [
42 {
43 "domain": "bcds9n12sumw6yp8iux.a.e-web.com.cn",
44 "type": "DOWNSTREAM",
45 "cname": "bcds9n12sumw6yp8iux.a.e-web.com.cn"
46 },
47 {
48 "domain": "bcdsnsvz5at494i9xpm.b.e-web.com.cn",
49 "type": "UPSTREAM",
50 "cname": "bcdsnsvz5at494i9xpm.b.e-web.com.cn"
51 }
52 ]
53 }
54 ],
55 "marker": "1000908",
56 "nextMarker": "1000762",
57 "truncated": true
58}
错误码
参考公共错误码