Skip to content

根据ex_dept_id获取部门信息

适用版本>=v7.0.2305b.20230530

接口说明:根据三方id批量获取部门信息

请求说明

请求地址配置域名+/graph+/v7/depts/by_ex_dept_ids
请求方法POST
签名方式WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名)
权限要求通讯录查询(企业授权) kso.contacts.read

请求头(Header)

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

请求体(Body)

名称类型是否必填说明
ex_dept_idsstring[]部门外部id列表,长度不超过100

请求体示例

{
  "ex_dept_ids": [
    "1",
    "2",
  ]
}

响应体(Response)

名称类型说明
codeintegercode
detailstringdetail
msgstringmsg
dataobject返回信息体
itemsobject[]部门信息
abs_pathstring绝对路径
ctimeinteger创建时间,时间戳,单位为秒
ex_dept_idstring部门外部id,可以是外部身份源的ID,字符串长度不超过128位
idstring部门id,字符串长度不超过128位
namestring部门名称,字符串长度不超过128位
orderinteger排序值
parent_idstring父部门id,字符串长度不超过128位
leadersobjects[]部门领导id
orderint64排序值
user_idstring部门领导user_id

响应体示例

json
{
  "code": 0,
  "detail": "string",
  "msg": "string",
  "data": {
    "items": [
      {
        "abs_path": "string",
        "ctime": 0,
        "ex_dept_id": "string",
        "id": "string",
        "name": "string",
        "order": 0,
        "parent_id": "string",
        "leaders": [
          {
            "order": 0,
            "user_id": "string"
          }
        ]
      }
    ]
  }
}