You need to enable JavaScript to run this app.
导航
查询设备
最近更新时间:2024.06.21 17:45:39首次发布时间:2021.11.25 17:21:23

查询指定设备的信息。

请求说明

  • 请求方式:GET
  • 请求地址:https://open.volcengineapi.com?Action=GetDevice&Version=2021-01-01

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

Query

参数类型是否必选示例值描述
ActionStringGetDevice接口名称。当前 API 的名称为 GetDevice
VersionString2021-01-01接口版本。当前 API 的版本为 2021-01-01
DeviceIDString6851c282-c7f6-4a04-90f9-d9c8baxxxxxx 设备 ID,可通过调用 ListDevices 接口获取

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数类型示例值描述
SpaceIDString设备所属空间 ID

Type

String

设备类型:

  • IPC
  • NVR
  • Platform(平台)
DeviceNameString设备名称
DeviceIDString设备 ID
DeviceNSIDString设备国标 ID
UsernameString用户名
PasswordString密码
DescriptionString设备描述
CreatedAtString设备创建时间
UpdatedAtString设备更新时间
ManufactoryString设备厂商
AlertNotificationObject of AlertNotification设备报警事件通知方式,参考以下 报警通知结构说明
DeviceStreamsJSON Map主码流信息,参考以下 码流信息结构说明

Status

String

设备状态:

  • online
  • offline
  • unregisterd
  • invalid_password
ChannelNumInteger通道数量

RtpTransportTcp

Boolean

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

  • true:是(tcp,默认)
  • false:否(udp)
LocationString设备地址
CoordinatesObject of Coordinates设备经纬度,参考以下 经纬度结构说明

AutoPullAfterRegister

Boolean

是否自动启动拉流:

  • true(开启)
  • False(关闭)
DeviceIPString设备 IP 地址
DeviceSubStreamsArray of DeviceSubStreams子码流数组,数组下标为子码流序号(如子码流1取数组第1个元素);参考以下 码流信息结构说明
UseSubStreamBoolean是否使用子码流, 开启后可以拉取子码流

AlertNotification

参数类型示例值描述

Enabled

Boolean

是否开启报警通知服务:

  • true:开启报警,至少包含一种报警类型
  • false:关闭报警通知服务
PhoneBoolean电话报警
DeviceBoolean设备报警
SMSBoolean短信报警
GPSBooleanGPS 报警
VideoBoolean视频报警
DeviceFaultBoolean设备故障报警
OtherBoolean其它报警

DeviceStreams

参数类型示例值描述
StreamIDString视频流 ID
PullUrlsArray of String拉流地址
PushUrlString推流地址

Status

String

视频流状态:

  • online:在线
  • offline:离线

Coordinates

参数类型示例值描述
LongitudeFloat经度
LatitudeFloat纬度

DeviceSubStreams

参数类型示例值描述
StreamIDString视频流 ID
PullUrlsArray of String拉流地址
PushUrlString推流地址

Status

String

视频流状态:

  • online:在线
  • offline:离线

请求示例

GET https://open.volcengineapi.com?Action=GetDevice&Version=2021-01-01&DeviceID=6851c282-c7f6-4a04-90f9-d9c8baxxxxxx &SipServerID=34020000002000xxxxxx&SpaceID=

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2021120814224701019405910015015954",
        "Action": "GetDevice",
        "Version": "2021-01-01",
        "Service": "aiotvideo",
        "Region": "cn-north-1"
    },
    "Result": {
        "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,
        "Location": "",
        "Coordinates": {
            "Longitude": 0,
            "Latitude": 0
        },
        "DeviceStreams": {
            "3402002xxxxxx1000001": {
                "StreamID": "f3275626-5b49-4614-b667-65c8ecxxxxxx",
                "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"
            }
        },
        "DeviceSubStreams": {
            "3402002xxxxxx1000001": [
                {
                    "StreamID": "f3275626-5b49-4614-b667-65c8ecxxxxxx",
                    "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"
                }
            ],
            "3402002xxxxxx1000002": [
                {
                    "StreamID": "f3275626-5b49-4614-b667-65c8ecxxxxxx",
                    "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
    }
}

错误码

您可访问公共错误码,获取更多错误码信息。