获取企业部门列表
GET
https://open.teambition.com/api/org/departments该接口用于获取企业的部门列表
请求参数
Body 参数application/json
orgId
string
企业 ID
pageToken
string
可选
分页 token,首次获取数据时为空
pageSize
string
可选
返回结果数量,默认 30,最大 1000
示例
{
"orgId": "string",
"pageToken": "string",
"pageSize": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
result
array [object {8}]
必需
orgId
string
企业 ID
deptId
string
部门 ID
name
string
部门名称
parentId
string
必需
父部门 ID (没有为空)
created
string
创建时间
leaderId
string
部门负责人 ID
creatorId
string
创建者 ID
ancestorIds
array[string]
必需
所有祖先部门 ID 列表,ancestorIds[0] 为直接父部门,ancestorIds[1] 为父部门的父部门,以此类推
code
string
响应状态码
errorMessage
string
异常错误信息
示例
{
"result": [
{
"orgId": "string",
"deptId": "string",
"name": "string",
"parentId": "string",
"created": "string",
"leaderId": "string",
"creatorId": "string",
"ancestorIds": [
"string"
]
}
],
"code": "string",
"errorMessage": "string"
}
最后修改时间: 2 年前