查询设备通道列表
最近更新时间:2025-02-21 02:50:53
1. 接口描述
接口请求域名: vssapi.ctyun.cn
默认接口请求频率限制:500次/秒。
查询设备通道列表。
2. 请求参数
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeDeviceChannels | 操作接口名,系统规定参数。 |
InProtocol | String | 是 | gb28181 | 使用的接入协议。 取值: gb28181 |
DeviceId | String | 是 | 32388487739092996 | 设备ID。 |
3. 返回参数
参数 | 类型 | 描述 |
---|---|---|
DeviceId | String | 设备ID。 |
GroupId | String | 设备所属组ID。 |
GbId | String | 设备国标ID。 |
DeviceEnabled | Long | 设备是否启用。 取值:0(停用), 1(启用) |
DeviceStatus | String | 设备状态。 取值:on(在线), off(离线), new(未注册)。 |
CreateSubDevice | Long | 是否自动创建子设备。 取值:1(自动创建), 2(手动创建) |
DeviceStats | DeviceStats | 设备统计信息。 |
DeviceChannels | DeviceChannel[] | nvr设备通道列表。 ipc设备忽略该字段,nvr设备才返回。 |
CreatedTime | String | 设备创建时间。 |
UpdatedTime | String | 设备更新时间。 |
RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
DeviceStats
参数 | 类型 | 描述 |
---|---|---|
ChannelSize | Long | 通道数量。 |
OnlineChannels | Long | 在线通道数量。 |
OffineChannels | Long | 离线通道数量。 |
OnlineStreams | Long | 在线流数量。 |
OfflineStreams | Long | 离线流数量。 |
FailedStreams | Long | 失败流数量。 |
DeviceChannel
参数 | 类型 | 描述 |
---|---|---|
ChannelNum | Long | 通道号。 |
ChannelName | String | 通道名称。 |
GbId | String | 设备国标ID。 |
DeviceId | String | 设备ID。 |
DeviceStatus | String | 设备状态。 取值:on(在线), off(离线), new(未注册)。 |
StreamStatus | String | 流状态。 取值:on(在线), off(离线), failed(失败)。 |
CreatedTime | String | 子设备(通道)创建时间。 |
UpdatedTime | String | 子设备(通道)更新时间。 |
4. 示例
4.1 请求示例
https://vssapi.ctyun.cn/
?Action=DescribeDeviceChannels
&InProtocol=gb28181
&DeviceId=29942103584801365
&Version=2020-06-12
&AccessKeyId=O0G0BPBI2T9YUD3U****
&Signature=KW0uWDSvVcLzqP6kywNh3%2BHt86E%3D
&SignatureMethod=HMAC-SHA1
&SignatureNonce=1119907810
&SignatureVersion=1.0
&Timestamp=1599040352
4.2 返回示例
{
"DeviceId": "29942103584801365",
"GroupId": "883904285310976",
"GbId": "34082400011188419252",
"DeviceEnabled": 1,
"DeviceStatus": "new",
"CreateSubDevice": 1,
"DeviceStats": {
"ChannelSize": 2,
"OnlineChannels": 0,
"OffineChannels": 0,
"OnlineStreams": 0,
"OfflineStreams": 0,
"FailedStreams": 0
},
"DeviceChannels": [
{
"ChannelNum": 2,
"ChannelName": "通道2",
"GbId": "34082400011328199910",
"DeviceId": "29942071372546647",
"DeviceStatus": "new",
"StreamStatus": "",
"CreatedTime": "2020-09-02 17:44:12",
"UpdatedTime": "2020-09-02 17:44:12"
},
{
"ChannelNum": 1,
"ChannelName": "通道1",
"GbId": "34082400011328566275",
"DeviceId": "29942077814997590",
"DeviceStatus": "new",
"StreamStatus": "",
"CreatedTime": "2020-09-02 17:44:12",
"UpdatedTime": "2020-09-02 17:44:12"
}
],
"CreatedTime": "2020-09-02 17:44:12",
"UpdatedTime": "2020-09-02 17:44:12",
"RequestId": "2bc6ff990b3c42129b51dce44c0266f2"
}
5. 错误码
ErrorCode | ErrorMessage |
---|---|
本页目录: