Skip to content

1. 获取指定用户

请求说明

请求地址: 配置域名+/graph+/v7/users/{user_id}请求方法: 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计算方法参考签名说明
AuthorizationBearer access_token(企业授权获取的token)
路径参数(Path)
名称类型是否必填说明
user_idstring用户id,字符串长度不超过128位
查询参数(Query)
名称参数类型是否必填说明
with_deptbooleantrue: 返回部门信息 false: 不返回部门信息 默认为:false
响应体(Response)
名称类型说明
codeintegercode
detailstringdetail
msgstringmsg
dataobject[]用户信息
   avatarstring头像
   ctimeinteger创建时间,时间戳,单位为秒
   deptsobject[]部门信息
     abs_pathstring绝对路径
     idstring部门id.字符串长度不超过20位
     namestring部门名称.字符串长度不超过128位
   emailstring邮箱.字符串长度不超过128位
   employee_idstring工号.字符串长度不超过32位
   ex_user_idstring用户外部id,可以是用户ID、用户名、邮箱、手机号、外部ID、在外部身份源的ID,为空则默认为用户id.字符串长度不超过128位
   genderobject性别
   idstring用户id,自动生成.字符串长度不超过128位
   login_namestring登录名.字符串长度不超过128位
   phonestring手机
   statusobject用户状态
   telephonestring座机.字符串长度不超过32位
   titlestring职务信息.字符串长度不超过128位
   user_namestring用户名.字符串长度不超过128位
   work_placestring办公地点.字符串长度不超过128位
响应体示例
json
{
  "code": 0,
  "detail": "string",
  "msg": "string",
  "data": {
    "avatar": "string",
    "ctime": 0,
    "depts": [
      {
        "abs_path": "string",
        "id": "string",
        "name": "string"
      }
    ],
    "email": "user@example.com",
    "employee_id": "string",
    "ex_user_id": "string",
    "gender": "string",
    "id": "string",
    "login_name": "string",
    "phone": "string",
    "status": "string",
    "telephone": "string",
    "title": "string",
    "user_name": "string",
    "work_place": "string"
  }
}