- 用户登录
- 系统管理
- 商品管理
- 故事杂谈
- 文件上传
- 高级查询
- 图表数组
获取部门列表
POST
https://cms.server.hqk10.top/api/v1/department/list
最后修改时间:2023-11-18 08:02:29
责任人:leo
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
offset
integer
偏移量
size
integer
页大小
id
integer
部门id
name
string
部门名
leader
string
部门领导名
parentId
integer
父级部门id
enable
integer
是否启用
createAt
array[string]
创建时间
updateAt
array[string]
更新时间
示例
{
"offset": 0,
"size": 10
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cms.server.hqk10.top/api/v1/department/list' \
--header 'Content-Type: application/json' \
--data-raw '{
"offset": 0,
"size": 10
}'
返回响应
🟢200成功
application/json
Body
data
object
必需
list
array [object {7}]
必需
totalCount
integer
必需
code
integer
必需
message
string
必需
示例
{
"data": {
"list": [
{
"id": 1,
"name": "总裁办",
"parentId": null,
"leader": null,
"enable": 1,
"createAt": "2023-11-12 16:45:10",
"updateAt": "2023-11-12 16:45:10"
},
{
"id": 2,
"name": "研发部",
"parentId": null,
"leader": null,
"enable": 1,
"createAt": "2023-11-12 16:45:36",
"updateAt": "2023-11-12 16:45:36"
},
{
"id": 3,
"name": "运营部",
"parentId": null,
"leader": null,
"enable": 1,
"createAt": "2023-11-12 16:45:44",
"updateAt": "2023-11-12 16:45:44"
},
{
"id": 4,
"name": "客服部",
"parentId": null,
"leader": null,
"enable": 1,
"createAt": "2023-11-12 16:45:52",
"updateAt": "2023-11-12 16:45:52"
},
{
"id": 5,
"name": "人事部",
"parentId": null,
"leader": null,
"enable": 1,
"createAt": "2023-11-12 16:45:59",
"updateAt": "2023-11-12 16:45:59"
}
],
"totalCount": 5
},
"code": 200,
"message": "操作成功"
}
🟠401未携带token
🟠401token过期
🟠400字段缺失
🟠429请求过于频繁,请稍后再试