获取设备配置(包含子设备配置)
本地
本地
POST
http://127.0.0.1:9999/api/v1/plugin/device/config
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
voucher
string
可选
device_id
string
可选
device_number
string
设备编号
示例
{
"voucher": "string",
"device_id": "string",
"device_number": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:9999/api/v1/plugin/device/config' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
voucher
string
必需
device_type
string
必需
protocol_type
string
必需
config
object
必需
sub_device
null
必需
示例
{
"code": 200,
"message": "success",
"data": {
"id": "2611f2a8-fdab-9247-efc7-683e9de4f137",
"voucher": "{\"username\":\"aaaaaa\",\"password\":\"\"}",
"device_type": "2",
"protocol_type": "MODBUS",
"config": {},
"sub_device": null
}
}
修改于 2024-04-09 09:23:43