更新设备在线状态
# 更新设备在线状态
# 基本信息
API Path /giot/v2/devices/{deviceId}/onlinestatus
请求协议 HTTP
请求方法 PUT
Query参数:
| 参数名 | 说明 | 必填 | 类型 | 限制 | 示例 |
|---|---|---|---|---|---|
| productCode | productCode | 是 | [string] | ||
| status | 在线状态,true入库,false入缓存 status表示在线状态 ture在线 false离线 | 是 | [boolean] | ||
| expiredTime | 超时时间,默认0,不超时 | 否 | [int] |
Rest参数:
| 参数名 | 说明 | 必填 | 类型 | 值可能性 | 限制 | 示例 |
|---|---|---|---|---|---|---|
| deviceId | 设备唯一标识符 | 是 | [string] |
响应内容:
返回结果 Json Object
| 参数名 | 说明 | 必填 | 类型 | 值可能性 | 限制 | 示例 |
|---|---|---|---|---|---|---|
| deviceId | 设备ID | 否 | [string] | |||
| expiredTime | 过期时间 | 否 | [string] | |||
| status | 设备状态 | 否 | [string] | |||
| updatedTime | 更新时间 | 否 | [string] |
成功示例:
{
"deviceId": "0003b3dd-31c9-4c42-bdf5-e499790714f9", //设备ID
"updatedTime": null, //更新时间
"expiredTime": 32434, //设备过期时间
"status": "active" //设备在线状态
}
1
2
3
4
5
6
2
3
4
5
6
失败示例:
{
"code": 500,
"message": "xxxxxxxxxx",
"key": null
}
1
2
3
4
5
2
3
4
5
上次更新: 2021-12-01 16:48:01