Skip to content

查询子部门列表

请求说明

请求地址: 配置域名+/graph+/v7/depts/{dept_id}/children请求方法: GET 签名方式: WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名)

请求头(Header)

名称是否必填说明
Content-Type固定为: application/json
Wps-Docs-Date取当前时间, 示例: Wed, 23 Jan 2013 06:43:08 GMT
Wps-Docs-Authorization计算方法参考签名说明
Authorization授权token,格式:Bearer ${access_token},${access_token}需替换为从授权接口获取的access_token值

路径参数(Path)

名称类型是否必填说明
dept_idstring部门id,字符串长度不超过128位

查询参数(Query)

名称参数类型是否必填说明
recursivebooleantrue: 递归查询子部门 false: 不递归查询子部门 默认为:false
page_sizeinteger分页大小,默认为:10,最大值:50
page_tokenstring分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果
with_totalbooleantrue: 返回总记录数 false: 不返回总记录数 默认为:false

响应体(Response)

名称类型说明
dataobject返回信息体
   itemsobject[]部门列表
     abs_pathstring绝对路径
     ctimeinteger创建时间,时间戳,单位为秒
     external_idstring第三方用户id,字符串长度不超过128位
     idstring部门id,字符串长度不超过128位
     namestring部门名称,字符串长度不超过128位
     orderinteger排序值
     parent_idstring父部门id,字符串长度不超过128位
   next_page_tokenstring下一页token
   totalinteger总数
codeinteger错误码,参照《错误码说明》
msgstring状态信息
detailstring详细信息

响应体示例

json
{
  "code": 200,
  "detail": "string",
  "msg": "success",
  "data": {
    "items": [
      {
        "abs_path": "string",
        "ctime": 1359237197,
        "external_id": "1",
        "id": "p01",
        "name": "p01",
        "order": 0,
        "parent_id": "1"
      }
    ],
    "next_page_token": "string",
    "total": 1
  }
}