根据key查询遥测当前值✅
GET
/api/v1/telemetry/datas/current/keys设备当前值查询,获取设备每个key的最新一条数据
请求参数
Query 参数
device_id
string
必需
示例值:
5fd9b168-9e2a-d91c-a7c3-9c1f4d4b5137
keys
array[string]
必需
示例值:
["temperature"]
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
array [object {7}]
必需
device_id
string
可选
key
string
数据名称
label
string
可选
tenant_id
string
可选
ts
string
时间戳
如:2024-03-13T00:28:11.039675Z
unit
string
可选
value
number
可选
示例
{
"code": 200,
"message": "Get current data successfully",
"data": [
{
"device_id": "5fd9b168-9e2a-d91c-a7c3-9c1f4d4b5137",
"key": "temperature",
"label": "温度",
"tenant_id": "f2c67e1a",
"ts": "2024-05-20T18:04:51.465+08:00",
"unit": "℃",
"value": -9.21
}
]
}
最后修改时间: 9 个月前