更新设备模板
本地
本地
PUT
http://127.0.0.1:9999/api/v1/device_config
设备配置
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
additional_info
string
附加信息
<= 255 字符
description
string
描述
<= 255 字符
device_template_id
string
设备模板id
<= 36 字符
id
string
设备配置id
<= 36 字符
name
string
设备配置名称
<= 255 字符
protocol_config
string
协议配置
protocol_type
string
可选
<= 100 字符
remark
string
备注
<= 255 字符
voucher_type
string
可选
<= 500 字符
other_config
string
其他说明
示例
{
"device_type": "1",
"id": "00db6263-082b-a38d-e8b9-624abff9c5b2",
"name": "般思明基第支但",
"voucher_type": "XXX",
"device_conn_type": "B",
"protocol_type": "MQTT"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://127.0.0.1:9999/api/v1/device_config' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"device_type": "1",
"id": "00db6263-082b-a38d-e8b9-624abff9c5b2",
"name": "般思明基第支但",
"voucher_type": "XXX",
"device_conn_type": "B",
"protocol_type": "MQTT"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
name
string
必需
device_template_id
null
必需
device_type
string
必需
protocol_type
string
必需
voucher_type
string
必需
protocol_config
null
必需
device_conn_type
string
必需
additional_info
null
必需
description
null
必需
remark
null
必需
updated_at
string
必需
示例
{
"code": 200,
"message": "Update deviceconfig successfully"
}
修改于 2025-03-24 08:04:56