查询指定空间内已接入的设备列表。
使用 GET 方式发起请求。
下表仅列出了接口特有的请求参数和部分公共参数。完整的公共参数列表,参考「公共参数」。
字段 | 位置 | 类型 | 必填 | 说明 | 值 |
---|---|---|---|---|---|
Action | Query | String | 是 | 公共参数,OpenAPI 接口名称 | ListDevices |
Version | Query | String | 是 | 公共参数,OpenAPI 接口版本 | 2021-01-01 |
SpaceID | Query | String | 是 | 空间 ID | 可通过调用 ListSpaces 接口获取 |
DeviceID | Query | String | 否 | 筛选条件,设备 ID | 可通过调用 CreateDevice 接口获取 |
DeviceNSID | Query | String | 否 | 筛选条件,设备国标 ID | 可通过调用 GenSipID 接口生成设备国标 ID |
通用返回参数,请参考 ResponseMetadata 结构体说明。
Result 字段包含以下参数:
字段 | 类型 | 说明 |
---|---|---|
Devices | Array of objects | 查询到的设备信息列表,参考以下 List<Devices> 结构说明 |
List<Devices>
结构说明字段 | 类型 | 说明 |
---|---|---|
SpaceID | String | 设备所属空间 ID |
Type | String | 设备类型:
|
DeviceName | String | 设备名称 |
DeviceID | String | 设备 ID |
DeviceNSID | String | 设备国标 ID |
Username | String | 用户名 |
Password | String | 密码 |
Status | String | 设备状态:
|
ChannelNum | Integer | 通道数 |
Description | String | 设备描述 |
CreatedAt | String | 设备创建时间 |
UpdatedAt | String | 设备更新时间 |
Manufactory | String | 设备厂商 |
AutoPullAfterRegister | Boolean | 注册后是否自动开始拉流:
|
AlertNotification | Objects | 设备报警配置,参考以下 报警配置结构说明 |
RtpTransportTcp | Boolean | 流媒体传输是否使用 TCP 协议:
|
Location | String | 设备地址 |
Coordinates | Objects | 设备经纬度,参考以下 经纬度结构说明 |
DeviceStreams | Object | 主码流信息,参考以下 码流信息结构说明 |
DeviceSubStreams | Array of Objects | 子码流数组,数组下标为子码流序号(如子码流1取数组第1个元素);参考以下 码流信息结构说明 |
UseSubStream | Boolean | 是否使用子码流, 开启后可以拉取子码流 |
报警配置结构说明
字段 | 类型 | 说明 |
---|---|---|
Enabled | Boolean | 是否开启报警通知服务:
|
Phone | Boolean | 是否开启电话报警方式,默认为 false |
Device | Boolean | 是否开启设备报警方式,默认为 false |
SMS | Boolean | 是否开启短信报警方式,默认为 false |
GPS | Boolean | 是否开启 GPS 报警方式,默认为 false |
Video | Boolean | 是否开启视频报警方式,默认为 false |
DeviceFault | Boolean | 是否开启设备故障报警方式,默认为 false |
Other | Boolean | 是否开启其他报警方式,默认为 false |
经纬度结构说明
字段 | 类型 | 说明 |
---|---|---|
Longitude | Float64 | 经度 |
Latitude | Float64 | 纬度 |
码流信息结构说明
字段 | 类型 | 说明 |
---|---|---|
StreamID | String | 视频流 ID |
PullUrls | String[] | 拉流地址 |
PushUrl | String | 推流地址 |
Status | String | 视频流状态:
|
GET https://open.volcengineapi.com?Action=ListDevices &Version=2021-01-01 &SpaceID=2db38a3a-2a9d-4bf7-afd9-7cdc13xxxxxx &<公共请求参数>
{ "ResponseMetadata": { "RequestId": "202304111721102AF16D52C34EDD3E9FA7", "Action": "ListDevices", "Version": "2021-01-01", "Service": "aiotvideo", "Region": "cn-north-1" }, "Result": { "PageNumber": 1, "PageSize": 20, "TotalCount": 7, "Devices": [ { "SpaceID": "2db38a3a-2a9d-4bf7-afd9-7cdc13xxxxxx", "Type": "IPC", "DeviceName": "SH-HK-IPC01", "DeviceID": "6851c282-c7f6-4a04-xxxx-xxxx", "DeviceNSID": "34020056991320xxxxxx", "Username": "34020056991320xxxxxx", "Password": "xxxxxx", "Status": "online", "ChannelNum": 1, "Description": "Camera001", "AutoPullAfterRegiter": false, "Manufactory": "ABC", "CreatedAt": "2021-12-08T14:06:58+08:00", "UpdatedAt": "2021-12-08T14:06:58+08:00", "AlertNotification": { "Enabled": false, "Phone": false, "Device": false, "SMS": false, "GPS": false, "Video": false, "DeviceFault": false, "Other": false }, "DeviceIP": "xx.xxx.xxx.xx", "RtpTransportTcp": true, "DeviceStreams": { "988800xxxxxx20000000": { "StreamID": "2c6b2bb4-4463-468c-adf5-2ac5b75f6847", "PullUrls": [ "rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp" ], "PushUrl": "rtmp://xxxx.fcdn-xxx-push.org/xxxx/xxx000001?Time=1681798490&Secret=xxx", "Status": "" }, "988800xxxxxx20000001": { "StreamID": "a43dae5a-0823-4970-a1fc-6b6c88xxxxxx", "PullUrls": [ "rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp" ], "PushUrl": "rtmp://xxxx.fcdn-xxx-push.org/xxxx/xxx000001?Time=1681798490&Secret=xxx", "Status": "" }, "988800xxxxxx20000002": { "StreamID": "91b4072c-fb65-444b-b0c4-687041xxxxxx", "PullUrls": [ "rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp" ], "PushUrl": "rtmp://xxxx.fcdn-xxx-push.org/xxxx/xxx000001?Time=1681798490&Secret=xxx", "Status": "" }, ... }, "DeviceSubStreams": { "988800xxxxxx20000000": [ { "StreamID": "516bcfaa-9075-4007-85a4-ebd543xxxxxx", "PullUrls": [ "rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp" ], "PushUrl": "rtmp://xxxx.fcdn-xxx-push.org/xxxx/xxx000001?Time=1681798490&Secret=xxx", "Status": "online" }, { "PullUrls": [ "rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp" ], "PushUrl": "rtmp://xxxx.fcdn-xxx-push.org/xxxx/xxx000001?Time=1681798490&Secret=xxx", "Status": "online" } ], "988800xxxxxx20000001": [ { "StreamID": "e1f6ab2b-09c4-4f36-8464-f30967xxxxxx", "PullUrls": [ "rtmp://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.flv", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.m3u8", "http://xxxx.fcdn-xxx-pull.org/xxxx/xxx000001.sdp" ], "PushUrl": "rtmp://xxxx.fcdn-xxx-push.org/xxxx/xxx000001?Time=1681798490&Secret=xxx", "Status": "online" } ], ...... }, "UseSubStream": true ...... ...... }