GET /rest/orgwise/3/member/{userNameOrKey}/department?getAllParents={getAllParents}
接口说明
根据用户名或用户Key获取指定用户的所属部门的信息
媒体类型
- application/json
查询参数
参数 | 说明 | 必须 |
---|---|---|
getAllParents | 是否获取所有父级部门,默认不返回。当getAllParents为true时,返回成员所在部门的所有上级部门 | 非必须 |
路径参数
参数 | 说明 | 必须 |
---|---|---|
userNameOrKey | 用户名或用户key,用户唯一标识 | 必须 |
返回示例
{ "code": 0, "msg": "Success", "data": { "id": 6, "no": "D6", "name": "开发四级部门并列", "type": "DEPARTMENT", "parent": 3, "parentDepartment": [ { "id": 1, "no": "D1", "name": "DSD公司", "type": "COMPANY", "createTime": "2022-06-07 10:45:29" }, { "id": 2, "no": "D2", "name": "开发部", "type": "DEPARTMENT", "createTime": "2022-06-07 11:21:01", "parent": 1 }, { "id": 3, "no": "D3", "name": "开发子部门", "type": "DEPARTMENT", "createTime": "2022-06-07 11:21:08", "parent": 2 } ], "rootDepartmentId": 1, "createTime": "2022-06-07 11:21:42.81" } }