激活设备✅
PUT
/api/v1/device/active激活设备
请求参数
Body 参数application/json
device_number
string
设备编号
<= 36 字符
name
string
设备名称
<= 255 字符
示例
{
"device_number": "string",
"name": "string"
}
示例代码
返回响应
成功(200)
无效的请求数据(400)
数据验证失败(422)
服务器内部错误(500)
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
string
必需
parent_id
null
必需
protocol
null
必需
lable
null
必需
location
null
必需
sub_device_addr
null
必需
current_version
string
必需
additional_info
string
必需
protocol_config
string
必需
remark1
null
必需
remark2
null
必需
remark3
null
必需
device_config_id
null
必需
batch_number
string
必需
activate_at
null
必需
is_online
integer
必需
access_way
null
必需
示例
成功示例
{
"code": 200,
"message": "Active product successfully",
"data": {
"id": "4465a6d9-7063-a4cb-9102-a9fa73d74b60",
"name": "8c205be5",
"voucher": "{\"username\":\"4465a6d9-7063-a4cb-9102-a9fa73d74b60\"}",
"tenant_id": "f2c67e1a",
"is_enabled": "",
"activate_flag": "active",
"created_at": "2024-04-01T21:58:59.855524Z",
"update_at": "2024-04-10T09:21:27.554667244Z",
"device_number": "4465a6d9-7063-a4cb-9102-a9fa73d74b60",
"product_id": null,
"parent_id": null,
"protocol": null,
"lable": "",
"location": null,
"sub_device_addr": null,
"current_version": null,
"additional_info": "{}",
"protocol_config": "{}",
"remark1": null,
"remark2": null,
"remark3": null,
"device_config_id": "29865ef7-edef-2186-7a37-615b299ff2b5",
"batch_number": null,
"activate_at": null,
"is_online": 0,
"access_way": "A"
}
}
最后修改时间: 1 年前