创建设备✅
POST
/api/v1/device创建设备
请求参数
Body 参数application/json
additional_info
string
附加信息
JSON
current_version
string
当前版本
<= 36 字符
device_config_id
string
设备配置ID
<= 36 字符
device_number
string
设备编号
<= 36 字符
label
string
标签
英文逗号分割
<= 255 字符
location
string
位置
(经纬度:xxxxxxxx,xxxxxxx)
<= 36 字符
name
string
设备名称
设备名称
<= 255 字符
parent_id
string
父设备ID
父设备ID
<= 36 字符
product_id
string
产品ID
产品ID
<= 36 字符
protocol_config
string
协议配置
JSON
remark1
string
备注1
<= 255 字符
remark2
string
备注2
<= 255 字符
remark3
string
备注3
<= 255 字符
sub_device_addr
string
子设备地址
子设备地址
<= 36 字符
voucher
string
凭证
凭证
<= 500 字符
description
string
描述
示例
{
"additional_info": "string",
"current_version": "string",
"device_config_id": "string",
"device_number": "string",
"label": "string",
"location": "string",
"name": "string",
"parent_id": "string",
"product_id": "string",
"protocol_config": "string",
"remark1": "string",
"remark2": "string",
"remark3": "string",
"sub_device_addr": "string",
"voucher": "string",
"description": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
name
string
必需
voucher
string
必需
tenant_id
string
必需
is_enabled
string
必需
activate_flag
string
必需
created_at
string
必需
update_at
string
必需
device_number
string
必需
product_id
null
必需
parent_id
string
必需
protocol
null
必需
lable
string
必需
location
string
必需
sub_device_addr
string
必需
current_version
string
必需
additional_info
string
必需
protocol_config
string
必需
remark1
string
必需
remark2
string
必需
remark3
string
必需
device_config_id
string
必需
batch_number
string
必需
activate_at
string
必需
is_online
integer
必需
access_way
string
必需
示例
{
"code": 200,
"message": "Create product successfully",
"data": {
"id": "6f9f2328-32d6-f6e2-0daf-7a6bd44a79b5",
"name": "下提计看",
"voucher": "irure dolore dolore ut",
"tenant_id": "2f4306df",
"is_enabled": "",
"activate_flag": "",
"created_at": "2024-03-15T09:11:38.8919772+08:00",
"update_at": "2024-03-15T09:11:38.8919772+08:00",
"device_number": "48",
"product_id": null,
"parent_id": "57",
"protocol": null,
"label": "in ut",
"location": "culpa sunt Ut dolor ven",
"sub_device_addr": "culpa est dolor a",
"current_version": "eu ex deserunt ",
"additional_info": "{}",
"protocol_config": "{}",
"remark1": "occaecat cillum",
"remark2": "tempor fugiat sit ea",
"remark3": "ad id",
"device_config_id": null,
"batch_number": null,
"activate_at": null,
"is_online": null,
"access_way": null
}
}
最后修改时间: 8 个月前