Skip to content

批量获取用户的自定义属性值

适用版本>=v7.0.2409b.20240926

接口说明:批量获取用户的自定义属性值

请求说明

请求地址配置域名+/graph+/v7/users/custom_attrs/batch_read
请求方法POST
签名方式WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名)
权限要求查询和管理用户自定义字段(企业授权) kso.user_custom_attr.readwrite

请求头(Header)

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

请求体(Body)

名称类型是否必填说明
user_idsstring[]用户id列表,列表长度最大为50

请求体示例

{
  "user_ids": ["string"]
}

响应体(Response)

名称类型说明
codeintegercode
detailstringdetail
msgstringmsg
dataobject返回信息体
usersobject[]用户列表
custom_attrsobject[]自定义属性列表
attr_idstring自定义属性 id
attr_namestring自定义属性名称
attr_value_typestring自定义属性值类型
optionstring自定义字段 type 为 option 时,展示的选项列表
relation_deptsstring[]自定义字段 type 为 relation_depts 时,展示的选项列表
relation_userstring自定义字段 type 为 relation_user 时,展示的选项列表
textstring自定义字段 type 为 text 时,展示的选项列表
urlobject自定义字段 type 为 url 时,展示的选项列表
titlestring标题
linkstring链接
user_idstring用户 id

响应体示例

{
  "data": {
    "users": [
      {
        "custom_attrs": [
          {
            "attr_id": "string",
            "attr_name": "string",
            "attr_value_type": "string",
            "option": "string",
            "relation_depts": ["string"],
            "relation_user": "string",
            "text": "string"
            "url": {
                "title": "string",
                "link": "string"
            }
          }
        ],
        "user_id": "string"
      }
    ]
  },
  "msg": "string",
  "code": 0
}