根据条件查询设备层级信息
GET
/api/departs
请求参数
Query 参数
label
string
查询的字段名
示例值:
name
search
string
可选
示例值:
级
page
string
可选
示例值:
1
limit
string
可选
示例值:
2
Header 参数
Authorization
string
可选
示例值:
Bearer {{token}}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://energy.25soft.com/api/departs' \
--header 'Authorization: Bearer {{token}}'
返回响应
🟢200成功
application/json
Body
code
number
是否成功
data
object
返回数据
total
number
设备总条数
rows
array [object {22}]
当前返回的设备对象列表
示例
{
"code": 0,
"data": {
"total": 3,
"rows": [
{
"fathers": [
"6034ed985a24e147a687aafb"
],
"openType": true,
"tags": [],
"userIds": [],
"_id": "6034eda55a24e147a687aafc",
"level": 1,
"jstype": 0,
"sort": 1,
"status": true,
"hardwareData": [],
"father": "6034ed985a24e147a687aafb",
"name": "2级",
"jsformula": "",
"creator": "5da994550dc418001b95d36f",
"createdAt": "2021-02-23T11:57:25.039Z",
"updatedAt": "2023-03-02T06:55:38.710Z",
"__v": 1,
"operateData": [],
"operateRunData": []
},
{
"fathers": [
"6034ed985a24e147a687aafb",
"6034eda55a24e147a687aafc"
],
"openType": true,
"tags": [],
"userIds": [],
"_id": "6034f6415a24e147a687aafd",
"level": 2,
"jstype": 1,
"sort": 1,
"status": true,
"hardwareData": [
{
"jstype": 0,
"_id": "6034fca85a24e147a687ab03",
"check": "6013d198f98519001dfadf8a",
"type": 0,
"jsformula": null,
"status": true,
"createdAt": "2023-05-19T07:01:00.604Z",
"updatedAt": "2023-05-19T07:01:00.604Z",
"device": "603497fa8588a17eb2d4724a"
}
],
"father": "6034eda55a24e147a687aafc",
"name": "3级",
"jsformula": "",
"creator": "5da994550dc418001b95d36f",
"createdAt": "2021-02-23T12:34:09.907Z",
"updatedAt": "2023-05-19T07:01:00.604Z",
"__v": 7,
"operateData": [],
"operateRunData": []
}
]
}
}
修改于 2023-07-26 03:12:18