设备详情✅
GET
/api/v1/device/detail/{id}设备详情
请求参数
Path 参数
id
string
设备ID
示例值:
5fd9b168-9e2a-d91c-a7c3-9c1f4d4b5137
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
name
string
必需
voucher
string
凭证
tenant_id
string
必需
is_enabled
string
启用/禁用
enabled-启用 disabled-禁用 默认禁用,激活后默认启用
activate_flag
string
激活标志
inactive-未激活 active-已激活
created_at
string
必需
update_at
string
必需
device_number
string
设备编号
product_id
null
必需
parent_id
null
必需
label
string
标签
单标签,英文逗号隔开
location
null
必需
sub_device_addr
null
必需
current_version
null
必需
additional_info
string
附件信息
json字符串
protocol_config
string
协议插件设备配置
协议插件相关的设备配置
remark1
null
必需
remark2
null
必需
remark3
null
必需
device_config_id
string
设备配置id
batch_number
null
必需
activate_at
null
激活时间
is_online
integer
是否在线
1-在线 0-离线
device_config_name
string
设备配置名称
access_way
string
必需
device_config
object
必需
protocol
null
必需
示例
{
"code": 200,
"message": "GetDevice successfully",
"data": {
"access_way": "A",
"activate_at": null,
"activate_flag": "",
"additional_info": "{}",
"batch_number": null,
"created_at": "2024-04-01T08:37:39.055041Z",
"current_version": null,
"device_config": {
"id": "e79f54b9-a117-1ce2-734a-3db1f6170d8b",
"name": "sensor1",
"device_template_id": "d670a256-090e-2a7c-fab7-f8e14eebe204",
"device_type": "1",
"protocol_type": "MQTT",
"voucher_type": "ACCESSTOKEN",
"protocol_config": null,
"device_conn_type": null,
"additional_info": "{}",
"description": null,
"tenant_id": "f2c67e1a",
"created_at": "2024-04-01T09:06:59.471498Z",
"updated_at": "2024-04-03T01:15:37.194231Z",
"remark": null
},
"device_config_id": "e79f54b9-a117-1ce2-734a-3db1f6170d8b",
"device_config_name": "sensor1",
"device_number": "5fd9b168-9e2a-d91c-a7c3-9c1f4d4b5137",
"id": "5fd9b168-9e2a-d91c-a7c3-9c1f4d4b5137",
"is_enabled": "",
"is_online": 0,
"label": "",
"location": null,
"name": "sensor1",
"parent_id": null,
"product_id": null,
"protocol": null,
"protocol_config": "{}",
"remark1": null,
"remark2": null,
"remark3": null,
"sub_device_addr": null,
"tenant_id": "f2c67e1a",
"update_at": "2024-04-01T08:37:39.055041Z",
"voucher": "{\"username\":\"sensor1\"}"
}
}
最后修改时间: 10 个月前