You need to enable JavaScript to run this app.
慢直播

慢直播

复制全文
设备管理
GetDevice - 查看设备
复制全文
GetDevice - 查看设备

查询指定设备的信息。

请求说明

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

调试

请求参数

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

参数
类型
是否必填
示例值
描述
Action
String

GetDevice

要执行的操作,取值:GetDevice。

Version
String

2021-01-01

API的版本,取值:2021-01-01。

SpaceID
String

6851c282-c7f6-4a04-90f9-d9c8baxxxxxx

空间 ID,可通过调用 ListSpaces 接口获取

与 SipServerID 二选一,以 SipServerID 优先

DeviceID
String

6851c282-c7f6-4a04-90f9-d9c8baxxxxxx

设备 ID,可通过调用 ListDevices 接口获取

返回参数

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

参数
类型
示例值
描述
SpaceID
String

6851c282-c7f6-4a04-90f9-d9c8baxxxxxx

设备所属空间 ID

Type
String

NVR

设备类型:

  • IPC
  • NVR
  • Platform(平台)
DeviceName
String

device1

设备名称

DeviceID
String

s851c282-c7f6-4a04-90f9-d9c8baxxxxxx

设备 ID

DeviceNSID
String

3140000xxxxxxxx

设备国标 ID

Username
String

3140000xxxxxxxx

用户名

Password
String

device_password$$

密码

Description
String

设备描述

设备描述

CreatedAt
String

2023-10-11 14:00:10

设备创建时间

UpdatedAt
String

2023-10-11 14:00:10

设备更新时间

Manufactory
String

manufactory

设备厂商

AlertNotification
Object

--

设备报警事件通知方式,参考以下 报警通知结构说明

DeviceStreams
Object

--

主码流信息,参考以下 码流信息结构说明

Status
String

online

设备状态:

  • online
  • offline
  • unregisterd
  • invalid_password
ChannelNum
Integer

10

通道数量

RtpTransportTcp
Boolean

false

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

  • true:是(tcp,默认)
  • false:否(udp)
Location
String

xxx location

设备地址

Coordinates
Object

--

设备经纬度,参考以下 经纬度结构说明

AutoPullAfterRegister
Boolean

false

是否自动启动拉流:

  • true(开启)
  • False(关闭)
DeviceIP
String

100.1.1.2

设备 IP 地址

DeviceSubStreams
Array of Object

--

子码流数组,数组下标为子码流序号(如子码流1取数组第1个元素);参考以下 码流信息结构说明

UseSubStream
Boolean

false

是否使用子码流, 开启后可以拉取子码流

请求示例

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

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
NotFound.DeviceData

The request is failed due to request data not found.

404
NotFound.Device

"NotFound.Device":"设备不存在,请确保设备参数正确性后重试"

最近更新时间:2025.06.30 13:08:35
这个页面对您有帮助吗?
有用
有用
无用
无用