文档中心 > 查询设备详细信息
查询设备详细信息

最近更新时间:2023-02-01

1、功能介绍

查询设备详细信息

2、请求参数

参数

是否必选

参数类型

描述

ActionString系统指定参数。取值:QueryDeviceInfo
DeviceIdString设备ID

3、响应参数

参数

是否必选

参数类型

描述

RequestId

String

该条接口请求ID

Code

String

0成功

其他失败

Message
String结果信息,成功时为空
Data
Object

返回数据,json对象结构

此接口为空

--DeviceIdString设备ID
--TypeString设备类型。取值:ipc、nvr、channel、platform
--NameString设备名称。

--GroupId

String

设备所属空间ID。

--GroupName

String设备所属空间名称。
--ParentIdString上级设备ID
--MaxChannelNumLong最大通道数量。
--ChannelIdLong通道号
--GbDeviceIdString设备国标ID
--GbVersionString

gb28181协议版本号,仅gb28181空间ipc、nvr设备有效。取值:2011、2016。

--PushUrlString推流地址
--UserNameString鉴权用户名(NVR的通道可以不用设置)。

--Password

String鉴权密码(NVR的通道可以不用设置)。
--ManageStatusString设备管理状态。取值:active(启用)、stop(停用)

--Longitude

String

设备经度
--LatitudeString设备纬度
--DeviceIpString设备IP
--DevicePortLong设备端口号
--DeviceSnString设备序列号

--DeviceAddress

String设备地址

--Description

String设备描述

--SupportPtz

Integer是否支持云台 0:不支持 1:支持
--BusinessStatusString设备业务状态,4位状态位0000,从右到左依次为: 计划录制状态,手动录制状态,计划截图状态,手动截图状态。(状态位更新有3-6分钟左右延迟)0:空闲 1:开启中
--MaxLocalRecordUploadTaskNumLong本地上传任务并发最大值,ipc(1-3),nvr(1-2*MaxChannelNum+1)platform(1-100)
--CreateTimeString

设备创建时间

格式如:yyyy-MM-ddTHH:mm:ssZ,UTC时间

--UpdateTimeString

设备更新时间

格式如:yyyy-MM-ddTHH:mm:ssZ,UTC时间

--MaxChannelIdInteger设备已使用的最大通道序号,nvr设备专用
--EnableGpsBool是否开启设备GPS数据上传
--GpsStoreDaysLong

GPS数据保存时间,取值:0 ~ 36 (月),0表示永久存储。


4、请求示例

请求示例:

GET https://api.unicloud.com/univms?

Action=QueryDeviceInfo

&DeviceId=uni0340001122060134481927

&公共请求参数

返回示例:

国标ipc设备:
{
    "RequestId": "5411eb02-5605-4789-9f9a-73cb38651add",
    "Code": "0",
    "Data": {
        "DeviceId": "uni0340011122061452814105",
        "Type": "ipc",
        "Name": "测试设备ipc",
        "GroupId": "uni0341122060286924475",
        "GroupName": "测试国标空间",
        "ParentId": "",
        "MaxChannelNum": "0",
        "ChannelId": "0",
        "GbDeviceId": "12000000001320794353",
        "PushUrl": "",
        "UserName": "username",
        "Password": "password",
        "GbVersion": "2016",
        "ManageStatus": "stop",
        "Longitude": "12.21",
        "Latitude": "21.12",
        "DeviceIp": "10.0.0.1",
        "DevicePort": "12345",
        "DeviceSn": "12345",
        "DeviceAddress": "测试设备地址",
        "Description": "测试设备ipc",
        "CreateTime": "2022-06-29T01:31:44Z",
        "UpdateTime": "2022-06-29T01:47:39Z"
    }
}
国标nvr设备:
{
    "RequestId": "9de1b2f8-50b4-4629-ace3-a8d98dbc6c2e",
    "Code": "0",
    "Data": {
        "DeviceId": "uni0340021122061775779565",
        "Type": "nvr",
        "Name": "nvr测试设备",
        "GroupId": "uni0341122060286924475",
        "GroupName": "测试国标空间",
        "ParentId": "",
        "MaxChannelNum": "16",
        "ChannelId": "0",
        "GbDeviceId": "12000000001180570947",
        "PushUrl": "",
        "UserName": "username",
        "Password": "password",
        "GbVersion": "2011",
        "ManageStatus": "active",
        "Longitude": "52.25",
        "Latitude": "25.52",
        "DeviceIp": "10.0.0.1",
        "DevicePort": "4321",
        "DeviceSn": "12345",
        "DeviceAddress": "测试设备地址",
        "Description": "nvr测试设备",
        "CreateTime": "2022-06-29T01:35:24Z",
        "UpdateTime": "2022-06-29T01:35:24Z",
		"MaxChannelId": 1
    }
}
国标channel设备(nvr):
{
    "RequestId": "fa66707e-ad7c-4b5d-b8b0-a0d5e3c9a9a9",
    "Code": "0",
    "Data": {
        "DeviceId": "uni0340031122060938682400",
        "Type": "channel",
        "Name": "channel测试设备",
        "GroupId": "uni0341122060286924475",
        "GroupName": "测试国标空间",
        "ParentId": "uni0340021122061775779565",
        "MaxChannelNum": "0",
        "ChannelId": "1",
        "GbDeviceId": "12000000001320130360",
        "PushUrl": "",
        "UserName": "",
        "Password": "",
        "GbVersion": "",
        "ManageStatus": "active",
        "Longitude": "52.25",
        "Latitude": "25.52",
        "DeviceIp": "10.0.0.1",
        "DevicePort": "4321",
        "DeviceSn": "12345",
        "DeviceAddress": "测试设备地址",
        "Description": "channel测试设备",
        "CreateTime": "2022-06-29T01:39:19Z",
        "UpdateTime": "2022-06-29T01:39:19Z"
    }
}
国标platform设备:
{
    "RequestId": "edb4305f-ec44-482b-811b-6ff86cacf8c3",
    "Code": "0",
    "Data": {
        "DeviceId": "uni0340041122070426267133",
        "Type": "platform",
        "Name": "测试级联设备0004",
        "GroupId": "uni03411202109f70ec206",
        "GroupName": "上海测试空间",
        "ParentId": "",
        "MaxChannelNum": "0",
        "ChannelId": "0",
        "GbDeviceId": "12000000002001000007",
        "PushUrl": "",
        "UserName": "username",
        "Password": "password",
        "GbVersion": "2011",
        "ManageStatus": "active",
        "Longitude": "",
        "Latitude": "",
        "DeviceIp": "",
        "DevicePort": "",
        "DeviceSn": "",
        "Description": "测试级联设备0004",
        "CreateTime": "2022-07-20T02:02:56Z",
        "UpdateTime": "2022-07-25T08:52:55Z",
        "SupportPtz": 1
    }
}
国标channel设备(platform):
{
    "RequestId": "3c031c68-06a0-4a24-be54-201e5f3c33b9",
    "Code": "0",
    "Data": {
        "DeviceId": "uni0340031122071116899151",
        "Type": "channel",
        "Name": "通道一",
        "GroupId": "uni03411202109f70ec206",
        "GroupName": "上海测试空间",
        "ParentId": "uni0340041122070426267133",
        "MaxChannelNum": "0",
        "ChannelId": "0",
        "GbDeviceId": "13050111091327000001",
        "PushUrl": "",
        "UserName": "",
        "Password": "",
        "GbVersion": "",
        "ManageStatus": "stop",
        "Longitude": "",
        "Latitude": "",
        "DeviceIp": "",
        "DevicePort": "",
        "DeviceSn": "",
        "Description": "",
        "CreateTime": "2022-07-21T11:34:58Z",
        "UpdateTime": "2022-07-26T01:06:17Z",
        "SupportPtz": 1,
        "BusinessStatus": "0000"
    }
}
rtmp空间下设备:
{
    "RequestId": "419a430d-bc01-453c-a8f6-bd3468a1f019",
    "Code": "0",
    "Data": {
        "DeviceId": "uni0340001122062015593783",
        "Type": "ipc",
        "Name": "rtmp测试设备",
        "GroupId": "uni0341122060388608507",
        "GroupName": "测试rtmp空间",
        "ParentId": "",
        "MaxChannelNum": "0",
        "ChannelId": "0",
        "GbDeviceId": "",
        "PushUrl": "rtmp://rtmp.pushdomain.param/uni0341122060388608507/uni0340001122062015593783?token=d570bc2b7add08dfd7d0b7709eaa7455&time=1656468856",
        "UserName": "",
        "Password": "",
        "GbVersion": "",
        "ManageStatus": "active",
        "Longitude": "52.25",
        "Latitude": "25.52",
        "DeviceIp": "10.0.0.1",
        "DevicePort": "",
        "DeviceSn": "12345",
        "DeviceAddress": "测试设备地址",
        "Description": "rtmp测试设备",
        "CreateTime": "2022-06-29T01:42:19Z",
        "UpdateTime": "2022-06-29T01:42:19Z"
    }
}




5、状态码

状态码

描述

200

OK

400

Bad Request