获取部门列表
GET/account/departments
获取部门列表(需团队管理员权限)
History
Version | Changes |
---|---|
v6.0.44 | Added in: v6.0.44 |
Request
Query Parameters
teamID stringrequired
团队ID
limit integer
Possible values: <= 100
Default value: 50
本次请求要返回的数量,默认值为50,超过100会被截断为100
cursor string
本次请求的起始位置
Responses
- 200
- 401
- 403
- 404
- 500
请求成功
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
data
object
Data object containing a list of items and page information.
list
object[]
id string
部门ID
memberCount number
成员数量
name string
部门名称
parentID string
父部门ID
PageInfo
object
count integer
本次返回的数量
endCursor string
本页最后一个光标,用于翻页
hasNextPage boolean
是否有下一页
startCursor string
本页第一个光标,用于翻页
totalCount integer
整个集合总数,包括本次响应中返回的
{
"data": {
"list": [
{
"id": "9e4S96rA",
"memberCount": 13,
"name": "项目交付部",
"parentID": "6ZJFarrd"
}
],
"PageInfo": {
"count": 0,
"endCursor": "string",
"hasNextPage": true,
"startCursor": "string",
"totalCount": 0
}
}
}
如果身份验证凭据不正确或丢失,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Unauthorized",
"errorMsg": "Access token is invalid"
}
如果scope检验不通过,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Forbidden",
"errorMsg": "Scope is invalid"
}
如果未找到资源对象,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "NotFound",
"errorMsg": "Not Found"
}
内部服务器错误
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Internal Server Error",
"errorMsg": "Internal Server Error"
}
Loading...