查询设备列表
最近更新时间:2025-02-21 02:50:53
1. 接口描述
接口请求域名: vssapi.ctyun.cn
默认接口请求频率限制:500次/秒。
查询设备列表。
2. 请求参数
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeDevices | 操作接口名,系统规定参数。 |
InProtocol | String | 否 | rtsp | 使用的接入协议。 取值: rtsp 虚拟业务组vgroup时,可为空 |
GroupId | String | 是 | 32388487739092994 | 根据设备所属组ID查询。 |
DirId | String | 否 | 897098424844288 | 根据设备所属目录ID查询。 |
DeviceVendor | String | 否 | 海康 | 根据设备厂商查询。 |
DeviceName | String | 否 | 高空抛物摄像头 | 根据设备名称查询。 |
DeviceType | String | 否 | ipc | 根据设备类型查询。 取值: ipc,nvr,platform |
StreamStatus | String | 否 | on | 根据流状态查询。 取值:on(在线), off(离线), failed(失败)。 |
SortBy | String | 否 | CreatedTime | 选择按一个字段排序,可选值为: - DeviceID - CreatedTime - UpdatedTime 默认为CreatedTime,按照创建时间排序。 |
SortDirection | String | 否 | asc | 排序方式,默认升序。 取值:asc(升序), desc(降序)。 |
PageNum | Long | 否 | 1 | 第几个分页,默认为1。 |
PageSize | Long | 否 | 20 | 分页大小,默认为20。 取值范围为1~1000 |
3. 返回参数
参数 | 类型 | 描述 |
---|---|---|
PageNum | Long | 第几个分页。 |
PageSize | Long | 分页大小。 |
TotalPage | Long | 分页总数。 |
TotalNum | Long | 设备总数。 |
Devices | Device[] | 设备列表。 |
RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
Device
参数 | 类型 | 描述 |
---|---|---|
DeviceId | String | 设备ID。 |
GroupId | String | 设备所属组ID。 |
DirId | String | 设备所属目录ID。 |
DeviceType | String | 设备类型。取值: ipc,nvr,platform |
DeviceVendor | String | 设备厂商。 |
DeviceName | String | 设备名称。 |
Description | String | 设备描述。 |
DeviceIp | String | 设备IP。 |
DevicePort | Long | 设备Port。 |
InProtocol | String | 设备使用的接入协议。 取值: rtsp |
PullUrl | String | 拉流地址 |
InType | Long | 视频流接入方式。 取值: push, pull 取值为push,推流; 取值为pull,拉流。 |
PullType | Long | 是否启用自动拉流。 仅gb28181组支持该字段。 取值:1, 2 取值为1,自动拉流,国标设备注册成功后自动启动拉流; 取值为2,按需拉流,需要通过触发的方式启动拉流。 |
PushType | Long | 是否启用自动激活推流地址,InType设置为push,该字段才有效。 默认继承组PushType,但如果设置了该字段,则会覆盖组下面的PushType值。 取值:1, 2。默认为1。 取值为1,自动激活推流地址,设备创建完成后,平台立刻自动生成推流地址; 取值为2,按需推流,需要通过触发的方式生成推流地址。 |
TransPriority | String | 设备视频流优先传输协议,默认tcp。 取值:tcp, udp。 取值为tcp,如果设备支持tcp协议传输,设备进行视频邀约时优先使用tcp协议接入到vss服务中。 取值为udp,设备进行视频邀约时优先使用udp协议接入到vss服务中。 |
DeviceEnabled | Long | 设备是否启用。 取值:0(停用), 1(启用) |
StreamStatus | String | 流状态。 取值:on(在线), off(离线), failed(失败)。 |
DeviceStats | DeviceStats | 设备统计信息。 |
DeviceDir | DeviceDir | 设备目录。 |
CreatedTime | String | 设备创建时间。 |
UpdatedTime | String | 设备更新时间。 |
4.1 请求示例
https://vssapi.ctyun.cn/
?Action=DescribeDevices
&InProtocol=rtmp
&GroupId=32388487739092994
&DirId=897098424844288
&DeviceVendor=海康
&DeviceName=高空抛物摄像头
&DeviceType=ipc
&StreamStatus=on
&SortBy=CreatedTime
&SortDirection=asc
&PageNum=1
&PageSize=20
&IncludeDeviceStats=0
&Version=2020-06-12
&AccessKeyId=O0G0BPBI2T9YUD3U****
&Signature=b5Gv5U2hlTHgeEaKE9KgVoo6DWw%3D
&SignatureMethod=HMAC-SHA1
&SignatureNonce=1578406
&SignatureVersion=1.0
&Timestamp=1599113545
4.2 返回示例
{
"pageNum": 1,
"pageSize": 20,
"totalPage": 1,
"totalNum": 3,
"devices": [
{
"deviceId": "29942077814997590",
"groupId": "883904285310976",
"dirId": "-1",
"deviceType": "ipc",
"deviceVendor": "haikang",
"deviceName": "test-nvr",
"description": "test-rtsp",
"deviceIp": "qui dolore",
"devicePort": 554,
"inProtocol": "adipisicing minim velit ad",
"pullUrl": "commodo enim incididunt mollit sint",
"inType": 8947797.381474704,
"pullType": 2,
"pushType": 33146009.935355455,
"transPriority": "tcp",
"deviceEnabled": 1,
"streamStatus": "",
"deviceStats": {
"channelSize": 1,
"onlineChannels": 0,
"offlineChannels": 0,
"onlineStreams": 0,
"offlineStreams": 0,
"failedStreams": 0
},
"deviceDir": {
"dirId": "0",
"dirName": "Lorem id",
"description": "magna elit id deserunt",
"groupId": "0",
"parentDirId": "0",
"createdTime": "0001-01-01 00:00:00",
"updatedTime": "0001-01-01 00:00:00"
},
"createdTime": "2020-09-02 17:44:12",,
"updatedTime": "2020-09-02 18:14:21",
},
{
"deviceId": "labore reprehenderit",
"groupId": "in ullamco magna ipsum",
"dirId": "magna in ut Lorem",
"deviceType": "cupidatat et",
"deviceVendor": "sint et",
"deviceName": "esse officia",
"description": "esse Duis adipisicing",
"deviceIp": "consectetur an",
"devicePort": -52034031.58358078,
"inProtocol": "esse ea",
"pullUrl": "ea officia dolore",
"inType": 2897808.3824326545,
"pullType": -91326041.13308074,
"pushType": 15156149.328298256,
"transPriority": "ad consectetur",
"deviceEnabled": -94293794.55694668,
"streamStatus": "consequat exercitation",
"deviceStats": {
"channelSize": 59812241.24499968,
"onlineChannels": 11182347.098896578,
"offlineChannels": -28747789.19854486,
"onlineStreams": -78413750.33000234,
"offlineStreams": 71174184.47909704,
"failedStreams": 70130695.48199403
},
"deviceDir": {
"dirId": "id magna",
"dirName": "sit non nostrud",
"description": "veniam id magna",
"groupId": "elit a",
"parentDirId": "veniam reprehenderit",
"createdTime": "quis",
"updatedTime": "minim"
},
"createdTime": "velit consectetur laboris ipsum",
"updatedTime": "eu proident"
}
],
"requestId": "3247575e6e1044668962f5a464fa3885"
}
5. 错误码
ErrorCode | ErrorMessage |
---|---|
本页目录: