更新产品
PUT
/api/v1/product更新产品,编辑的时候只能编辑名称、型号、图片、描述。不能修改设备配置、key
请求参数
Body 参数application/json
description
string
产品描述
<= 255 字符
id
string
产品id
<= 36 字符
name
string
产品名称
<= 255 字符
product_model
string
产品型号(编号)
image_url
string
产品图片地址
product_key
string
产品key
product_type
string
产品类型
device_config_id
string
设备配置
示例
{
"description": "string",
"id": "string",
"name": "string",
"product_model": "string",
"image_url": "string",
"product_key": "string",
"product_type": "string",
"device_config_id": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
name
string
产品名称
description
string
必需
product_type
string
产品类型
product_key
string
产品key
product_model
string
产品型号(编号)
image_url
string
图片地址
created_at
string
必需
remark
string
必需
additional_info
null
必需
tenant_id
string
必需
device_config_id
string
必需
示例
{
"code": 200,
"message": "Update product successfully",
"data": {
"id": "2dee3c7d-f7e1-8704-53fe-599d40d85207",
"name": "光美传感器",
"description": "xxxxxxxxxxxxxxxxx",
"product_type": "23213",
"product_key": "1",
"product_model": "xxxxxxx",
"image_url": "./xxx/xx.png",
"created_at": "2024-01-12T23:38:52.095064Z",
"remark": "12312444",
"additional_info": null,
"tenant_id": "2f4306df",
"device_config_id": "a54d83e7-2858-8331-3783-f936c4198a66"
}
}
最后修改时间: 5 个月前