You need to enable JavaScript to run this app.
导航
查看设备列表
最近更新时间:2023.07.21 14:45:51首次发布时间:2021.11.25 17:27:11

查询指定空间内已接入的设备列表。

请求方式

使用 GET 方式发起请求。

请求参数

下表仅列出了接口特有的请求参数和部分公共参数。完整的公共参数列表,参考「公共参数」。

字段
位置
类型
必填
说明
ActionQueryString公共参数,OpenAPI 接口名称ListDevices
VersionQueryString公共参数,OpenAPI 接口版本2021-01-01
SpaceIDQueryString空间 ID可通过调用 ListSpaces 接口获取
DeviceIDQueryString筛选条件,设备 ID可通过调用 CreateDevice 接口获取
DeviceNSIDQueryString筛选条件,设备国标 ID可通过调用 GenSipID 接口生成设备国标 ID

返回结果

返回参数说明

通用返回参数,请参考 ResponseMetadata 结构体说明

Result 字段包含以下参数:

字段
类型
说明
DevicesArray of objects查询到的设备信息列表,参考以下 List<Devices> 结构说明

List<Devices> 结构说明

字段
类型
说明
SpaceIDString设备所属空间 ID

Type

String

设备类型:

  • IPC
  • NVR
  • Platform(平台)
DeviceNameString设备名称
DeviceIDString设备 ID
DeviceNSIDString设备国标 ID
UsernameString用户名
PasswordString密码

Status

String

设备状态:

  • online
  • offline
  • unregistered
  • invalid_password
ChannelNumInteger通道数
DescriptionString设备描述
CreatedAtString设备创建时间
UpdatedAtString设备更新时间
ManufactoryString设备厂商

AutoPullAfterRegister

Boolean

注册后是否自动开始拉流:

  • true:开启
  • false:关闭
AlertNotificationObjects设备报警配置,参考以下 报警配置结构说明

RtpTransportTcp

Boolean

流媒体传输是否使用 TCP 协议:

  • true:是(tcp,默认)
  • false:否(udp)
LocationString设备地址
CoordinatesObjects设备经纬度,参考以下 经纬度结构说明
DeviceStreamsObject主码流信息,参考以下 码流信息结构说明
DeviceSubStreamsArray of Objects子码流数组,数组下标为子码流序号(如子码流1取数组第1个元素);参考以下 码流信息结构说明
UseSubStreamBoolean是否使用子码流, 开启后可以拉取子码流

报警配置结构说明

字段
类型
说明

Enabled

Boolean

是否开启报警通知服务:

  • true:开启,至少包含一种报警方式
  • false:关闭(默认)
PhoneBoolean是否开启电话报警方式,默认为 false
DeviceBoolean是否开启设备报警方式,默认为 false
SMSBoolean是否开启短信报警方式,默认为 false
GPSBoolean是否开启 GPS 报警方式,默认为 false
VideoBoolean是否开启视频报警方式,默认为 false
DeviceFaultBoolean是否开启设备故障报警方式,默认为 false
OtherBoolean是否开启其他报警方式,默认为 false

经纬度结构说明

字段
类型
说明
LongitudeFloat64经度
LatitudeFloat64纬度

码流信息结构说明

字段
类型
说明
StreamIDString视频流 ID
PullUrlsString[]拉流地址
PushUrlString推流地址

Status

String

视频流状态:

  • online:在线
  • offline:离线

示例

请求示例

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
      ......
      ......
}