简要描述
获取网关详情
请求 URL
https://openapi.mp.usr.cn/usrCloud/V6/device/getDevice
请求方式
POST
请求参数
名称 |
必选/可选 |
类型 |
位置 |
说明 |
X-Access-Token |
必选 |
String |
Header |
登录成功时返回的登录凭证(注意:X-Access-Token 有效时间为2小时,两小时内可以重复使用,获取详情) |
Content-Type |
必选 |
String |
Header |
消息体的媒体类型,必须为”application/json” |
deviceNo |
必选 |
String |
Body |
网关编号 |
响应参数
名称 |
类型 |
说明 |
data |
JSONObject |
响应数据 |
info |
String |
提示消息 |
status |
Integer |
返回码 |
响应数据(data)
名称 |
类型 |
说明 |
deviceNo |
String |
网关编号 |
projectId |
Integer |
网关组织id |
projectName |
String |
网关组织名称 |
deviceName |
String |
网关名称 |
deviceAddress |
deviceAddress |
网关地址 |
deviceCreateTime |
Integer |
网关创建时间 |
deviceUpdateTime |
Integer |
网关修改时间 |
productModel |
Integer |
网关型号id |
productModelName |
String |
网关型号名称 |
serialPortLimit |
Integer |
网关串口个数 |
devicePosition |
String |
网关经纬度 |
devicePositionType |
Integer |
网关定位类型 (1 固定位置 2 自动定位) |
deviceMac |
String |
网关Mac |
deviceImei |
String |
网关Imei |
deviceEnableStatus |
Integer |
网关启用禁用状态(1 启用 0 禁用) |
deviceFuncMonitor |
Integer |
网关网络监测开关( 0 关闭 1 开启) |
deviceFuncCloud |
Integer |
网关云组态功能( 0 关闭 1 开启) |
deviceIsTransProtocol |
Integer |
网关是否开启透传( 0 关闭 1 开启) |
devicePass |
String |
网关通讯密码 |
deviceStatus |
JSONObject |
网关状态 |
deviceTags |
JSONArray |
网关标签 |
ownerUid |
Integer |
所属用户id |
devicePassword |
String |
网关通讯密码 |
响应数据(deviceStatus)
名称 |
类型 |
说明 |
deviceNo |
String |
网关编号 |
onlineOffline |
Integer |
上下线 0:下线,1:上线 |
update |
Integer |
升级 0:不升级,1:升级 |
set |
Integer |
配置 0:不配置,1:配置中 |
monitorAlarm |
Integer |
报警 0:不报警,1:报警中 |
onlineTime |
Integer |
上线时间(时间戳秒) |
响应数据(deviceTagSetDatas)
名称 |
必选/可选 |
类型 |
说明 |
tagName |
必选 |
String |
标签类别名称,不允许名称重复,例如:“功耗” |
tagValue |
必选 |
String |
标签类别下的标签值名称,可设置多个,不允许名称重复,例如:“800W” |
返回码说明
返回码 |
说明 |
0 |
成功 |
2014 |
网关不存在 |
5004 |
权限不足 |
5106 |
参数不完整 |
5126 |
请求太频繁 |
请求示例
- POST https://openapi.mp.usr.cn/usrCloud/V6/device/getDevice
- Content-Type: application/json
-
- {
- "deviceNo": "00005842014003180940"
- }
响应示例
status: 0,info: ok
- Content-Type: application/json
-
- {
- "status": 0,
- "data": {
- "deviceNo": "00005842014003180940",
- "projectId": 172808,
- "projectName": "根组织",
- "deviceName": "name123",
- "deviceAddress": "山东省济南市历下区龙奥南路",
- "productModel": 15,
- "productModelName": "未知型号",
- "serialPortLimit": 1,
- "tcpOrNbDeviceType": 0,
- "devicePosition": "117.12639941,36.6565542",
- "devicePositionType": 1,
- "deviceEnableStatus": 1,
- "deviceWeight": 0,
- "deviceFuncMonitor": 0,
- "deviceFuncCloud": 1,
- "deviceIsTransProtocol": 0,
- "devicePass": "12312312",
- "deviceStatus": {
- "deviceNo": "00005842014003180940",
- "onlineOffline": 1,
- "sync": 0
- },
- "cloudSetDevice": 0,
- "ownerUid": 5842
- },
- "info": "ok",
- "account": "***"
- }