查询设备通道列表

最近更新时间:2025-02-21 02:50:53

1. 接口描述

接口请求域名: vssapi.ctyun.cn
默认接口请求频率限制:500次/秒。

查询设备通道列表。

2. 请求参数

参数类型是否必选示例值描述
ActionStringDescribeDeviceChannels操作接口名,系统规定参数。
InProtocolStringgb28181使用的接入协议。
取值: gb28181
DeviceIdString32388487739092996设备ID。

3. 返回参数

参数类型描述
DeviceIdString设备ID。
GroupIdString设备所属组ID。
GbIdString设备国标ID。
DeviceEnabledLong设备是否启用。
取值:0(停用), 1(启用)
DeviceStatusString设备状态。
取值:on(在线), off(离线), new(未注册)。
CreateSubDeviceLong是否自动创建子设备。
取值:1(自动创建), 2(手动创建)
DeviceStatsDeviceStats设备统计信息。
DeviceChannelsDeviceChannel[]nvr设备通道列表。
ipc设备忽略该字段,nvr设备才返回。
CreatedTimeString设备创建时间。
UpdatedTimeString设备更新时间。
RequestIdString唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

DeviceStats

参数类型描述
ChannelSizeLong通道数量。
OnlineChannelsLong在线通道数量。
OffineChannelsLong离线通道数量。
OnlineStreamsLong在线流数量。
OfflineStreamsLong离线流数量。
FailedStreamsLong失败流数量。

DeviceChannel

参数类型描述
ChannelNumLong通道号。
ChannelNameString通道名称。
GbIdString设备国标ID。
DeviceIdString设备ID。
DeviceStatusString设备状态。
取值:on(在线), off(离线), new(未注册)。
StreamStatusString流状态。
取值:on(在线), off(离线), failed(失败)。
CreatedTimeString子设备(通道)创建时间。
UpdatedTimeString子设备(通道)更新时间。

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. 错误码

ErrorCodeErrorMessage