Skip to content

功能概述

新增硬件设备接口

  • 新增硬件设备接口

接口访问

接口地址

system/manage/device/insert

请求方式 Method

POST

Header - Authorization Type : Bearer Token

属性类型长度必填默认值说明访问版本
tokenstring32true用户身份标识令牌-

请求参数

属性类型长度必填默认值说明
deviceNumberstring256true0设备编号
aliasstring256true0设备别名
gatewayIDint64true0网关ID
isOnlineint64true0设备是否在线,0-否 1-是
bindTimestring256true"0000-00-00 00:00:00"绑定时间
activationTimestring256true"0000-00-00 00:00:00"激活时间
lastOnlineTimestring256true"0000-00-00 00:00:00"最后在线时间
hardwareTypeint64true0设备类型,1-门锁 2-电表 3-水表
hardwareModelstring256true0硬件型号
switchStatusint64true0硬件开关状态

请求示例

{
    "deviceNumber":"22110002",
    "alias":"水表新增测试",
    "gatewayID":6,
    "isOnline":1,
    "bindTime":"0000-00-00 00:00:00",
    "activationTime":"0000-00-00 00:00:00",
    "lastOnlineTime":"0000-00-00 00:00:00",
    "hardwareType":3,
    "hardwareModel":"",
    "switchStatus":1
}

返回值

属性类型必填描述
responseobjecttrue响应内容
response.Codestringtrue响应码(例如:"200")
response.Messagestringtrue响应信息(例如:"Success")
requestIdstringtrue请求唯一 ID(用于排查问题)

返回示例

{
    "response": {
        "Code": "200",
        "Message": "Success"
    },
    "requestId": "d9531db7-f0ca-4775-b3c7-886e166b355d"
}

错误码

错误码说明解决方案
92001硬件设备类型错误检查传入参数
404Fail代码报错