更新转发目标配置
开发中PUT
/api/v1/forwarding/target请求参数
Body 参数application/json
id
string
必需
name
string
必需
forwarding_rule_id
string
必需
type
integer
必需
description
string
可选
config
object
必需
broker
string
必需
port
integer
必需
client_id
string
必需
username
string
必需
password
string
必需
topic
string
必需
qos
integer
必需
retain
boolean
必需
use_ssl
boolean
必需
示例
{
"id": "",
"name": "MQTT Broker Alpha",
"forwarding_rule_id": "9b9404fb-c1d5-645a-17f3-4bc83b580fbb",
"type": 1,
"description": "Primary MQTT broker for data forwarding",
"config": {
"broker": "mqtt.example.com",
"port": 1883,
"client_id": "forwarder_client_001",
"username": "mqtt_user",
"password": "mqtt_password",
"topic": "data/forwarded",
"qos": 1,
"retain": false,
"use_ssl": false
}
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
name
string
必需
forwarding_rule_id
string
必需
type
integer
必需
description
string
必需
config
object
必需
created_at
string
必需
updated_at
string
必需
示例
{
"code": 200,
"message": "转发目标配置更新成功",
"data": {
"id": "62c158dc-0d3e-aeac-9bff-f53b3628da6f",
"name": "xxxxxx",
"forwarding_rule_id": "9b9404fb-c1d5-645a-17f3-4bc83b580fbb",
"type": 1,
"description": "Primary MQTT broker for data forwarding",
"config": {
"qos": 1,
"port": 1883,
"topic": "data/forwarded",
"broker": "mqtt.example.com",
"retain": false,
"use_ssl": false,
"password": "mqtt_password",
"username": "mqtt_user",
"client_id": "forwarder_client_001"
},
"created_at": "2024-10-18T16:45:39.406049+08:00",
"updated_at": "2024-10-18T16:53:17.523922+08:00"
}
}
最后修改时间: 3 个月前