批量添加设备到平台
本地
本地
POST
http://127.0.0.1:9999/api/v1/device/service/access/batch
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
service_access_id
string
必需
device_list
array [object {4}]
必需
device_name
string
必需
device_config_id
string
必需
device_number
string
必需
description
string
可选
示例
{
"service_access_id": "string",
"device_list": [
{
"device_name": "string",
"device_config_id": "string",
"device_number": "string",
"description": "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/device/service/access/batch' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
array [object {28}]
必需
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
null
可选
parent_id
null
可选
protocol
null
可选
label
null
可选
location
null
可选
sub_device_addr
null
可选
current_version
null
可选
additional_info
string
可选
protocol_config
string
可选
remark1
null
可选
remark2
null
可选
remark3
null
可选
device_config_id
string
可选
batch_number
null
可选
activate_at
null
可选
is_online
integer
可选
access_way
string
可选
description
string
可选
service_access_id
null
可选
示例
{
"code": 200,
"message": "Create product successfully",
"data": [
{
"id": "92712751-671f-8814-f647-a5ffba094885",
"name": "需治识也",
"voucher": "{\"username\":\"fe2163a6-07a9-ebe2-a53\"}",
"tenant_id": "63a4b529",
"is_enabled": "",
"activate_flag": "active",
"created_at": "2024-07-10T15:30:51.0000837Z",
"update_at": "2024-07-10T15:30:51.0000837Z",
"device_number": "xxxxxxxxx23424",
"product_id": null,
"parent_id": null,
"protocol": null,
"label": null,
"location": null,
"sub_device_addr": null,
"current_version": null,
"additional_info": "{}",
"protocol_config": "{}",
"remark1": null,
"remark2": null,
"remark3": null,
"device_config_id": "997bcabf-1ddf-8e93-4e1e-6200b0135fb2",
"batch_number": null,
"activate_at": null,
"is_online": 0,
"access_way": "B",
"description": "率领号率儿育土受线七来强等油术运系深。到内信特收县向常况机果导同每半于。级造商温技火非更间置观斗前该。无然定农日放面世为整计参清因。",
"service_access_id": null
}
]
}
修改于 2025-03-25 03:01:31